Skip to content

Commit 683f399

Browse files
committed
Change atttypmod from int16 to int32, for Thomas.
1 parent 647bbfb commit 683f399

File tree

23 files changed

+67
-67
lines changed

23 files changed

+67
-67
lines changed

src/backend/access/common/tupdesc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.40 1998/06/15 19:27:45 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.41 1998/07/12 21:29:13 momjian Exp $
1111
*
1212
* NOTES
1313
* some of the executor utility code such as "ExecTypeFromTL" should be
@@ -255,7 +255,7 @@ TupleDescInitEntry(TupleDesc desc,
255255
AttrNumber attributeNumber,
256256
char *attributeName,
257257
Oid typeid,
258-
int16 typmod,
258+
int32 typmod,
259259
int attdim,
260260
bool attisset)
261261
{
@@ -448,7 +448,7 @@ BuildDescForRelation(List *schema, char *relname)
448448
TupleConstr *constr = (TupleConstr *) palloc(sizeof(TupleConstr));
449449
char *attname;
450450
char *typename;
451-
int16 atttypmod;
451+
int32 atttypmod;
452452
int attdim;
453453
int ndef = 0;
454454
bool attisset;

src/backend/catalog/index.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.43 1998/06/15 19:28:09 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.44 1998/07/12 21:29:13 momjian Exp $
1111
*
1212
*
1313
* INTERFACE ROUTINES
@@ -107,7 +107,7 @@ DefaultBuild(Relation heapRelation, Relation indexRelation,
107107
* AttrNumber attnum;
108108
* uint32 attnelems;
109109
* int32 attcacheoff;
110-
* int16 atttypmod;
110+
* int32 atttypmod;
111111
* bool attbyval;
112112
* bool attisset;
113113
* char attalign;

src/backend/commands/copy.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
*
88
* IDENTIFICATION
9-
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.47 1998/06/19 11:40:46 scrappy Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.48 1998/07/12 21:29:14 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -205,7 +205,7 @@ CopyTo(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
205205
FmgrInfo *out_functions;
206206
Oid out_func_oid;
207207
Oid *elements;
208-
int16 *typmod;
208+
int32 *typmod;
209209
Datum value;
210210
bool isnull; /* The attribute we are copying is null */
211211
char *nulls;
@@ -231,7 +231,7 @@ CopyTo(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
231231
{
232232
out_functions = (FmgrInfo *) palloc(attr_count * sizeof(FmgrInfo));
233233
elements = (Oid *) palloc(attr_count * sizeof(Oid));
234-
typmod = (int16 *) palloc(attr_count * sizeof(int16));
234+
typmod = (int32 *) palloc(attr_count * sizeof(int16));
235235
for (i = 0; i < attr_count; i++)
236236
{
237237
out_func_oid = (Oid) GetOutputFunction(attr[i]->atttypid);
@@ -378,7 +378,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
378378
tuples_read = 0;
379379
bool reading_to_eof = true;
380380
Oid *elements;
381-
int16 *typmod;
381+
int32 *typmod;
382382
FuncIndexInfo *finfo,
383383
**finfoP = NULL;
384384
TupleDesc *itupdescArr;
@@ -499,7 +499,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
499499
{
500500
in_functions = (FmgrInfo *) palloc(attr_count * sizeof(FmgrInfo));
501501
elements = (Oid *) palloc(attr_count * sizeof(Oid));
502-
typmod = (int16 *) palloc(attr_count * sizeof(int16));
502+
typmod = (int32 *) palloc(attr_count * sizeof(int16));
503503
for (i = 0; i < attr_count; i++)
504504
{
505505
in_func_oid = (Oid) GetInputFunction(attr[i]->atttypid);

src/backend/nodes/makefuncs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/nodes/makefuncs.c,v 1.9 1998/02/26 04:32:08 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/makefuncs.c,v 1.10 1998/07/12 21:29:16 momjian Exp $
1111
*
1212
* NOTES
1313
* Creator functions in POSTGRES 4.2 are generated automatically. Most of
@@ -53,7 +53,7 @@ Var *
5353
makeVar(Index varno,
5454
AttrNumber varattno,
5555
Oid vartype,
56-
int16 vartypmod,
56+
int32 vartypmod,
5757
Index varlevelsup,
5858
Index varnoold,
5959
AttrNumber varoattno)
@@ -78,7 +78,7 @@ makeVar(Index varno,
7878
Resdom *
7979
makeResdom(AttrNumber resno,
8080
Oid restype,
81-
int16 restypmod,
81+
int32 restypmod,
8282
char *resname,
8383
Index reskey,
8484
Oid reskeyop,

src/backend/optimizer/prep/preptlist.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.11 1998/06/15 19:28:46 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.12 1998/07/12 21:29:17 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -319,7 +319,7 @@ new_relation_targetlist(Oid relid, Index rt_index, NodeTag node_type)
319319

320320
temp_list = MakeTLE(makeResdom(attno,
321321
atttype,
322-
get_atttypmod(relid, attno),
322+
get_atttypmod(relid, attno),
323323
attname,
324324
0,
325325
(Oid) 0,

src/backend/parser/parse_expr.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.31 1998/07/08 14:04:10 thomas Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.32 1998/07/12 21:29:18 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -31,7 +31,7 @@
3131
#include "parser/parse_target.h"
3232
#include "utils/builtins.h"
3333

34-
static Node *parser_typecast(Value *expr, TypeName *typename, int16 atttypmod);
34+
static Node *parser_typecast(Value *expr, TypeName *typename, int32 atttypmod);
3535

3636
/*
3737
* transformExpr -
@@ -433,7 +433,7 @@ exprType(Node *expr)
433433
}
434434

435435
static Node *
436-
parser_typecast(Value *expr, TypeName *typename, int16 atttypmod)
436+
parser_typecast(Value *expr, TypeName *typename, int32 atttypmod)
437437
{
438438
/* check for passing non-ints */
439439
Const *adt;
@@ -513,7 +513,7 @@ parser_typecast(Value *expr, TypeName *typename, int16 atttypmod)
513513
* Convert (only) constants to specified type.
514514
*/
515515
Node *
516-
parser_typecast2(Node *expr, Oid exprType, Type tp, int16 atttypmod)
516+
parser_typecast2(Node *expr, Oid exprType, Type tp, int32 atttypmod)
517517
{
518518
/* check for passing non-ints */
519519
Const *adt;

src/backend/parser/parse_func.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.20 1998/07/08 14:04:10 thomas Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.21 1998/07/12 21:29:19 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1220,7 +1220,7 @@ setup_tlist(char *attname, Oid relid)
12201220
Resdom *resnode;
12211221
Var *varnode;
12221222
Oid typeid;
1223-
int16 type_mod;
1223+
int32 type_mod;
12241224
int attno;
12251225

12261226
attno = get_attnum(relid, attname);

src/backend/parser/parse_node.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.16 1998/05/29 14:00:21 thomas Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.17 1998/07/12 21:29:20 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -222,7 +222,7 @@ make_var(ParseState *pstate, Oid relid, char *refname,
222222
int vnum,
223223
attid;
224224
Oid vartypeid;
225-
int16 type_mod;
225+
int32 type_mod;
226226
int sublevels_up;
227227

228228
vnum = refnameRangeTablePosn(pstate, refname, &sublevels_up);

src/backend/parser/parse_target.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.17 1998/07/08 14:04:11 thomas Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.18 1998/07/12 21:29:20 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -41,7 +41,7 @@ Node *
4141
SizeTargetExpr(ParseState *pstate,
4242
Node *expr,
4343
Oid attrtype,
44-
int16 attrtypmod);
44+
int32 attrtypmod);
4545

4646

4747
/* transformTargetIdent()
@@ -92,7 +92,7 @@ transformTargetIdent(ParseState *pstate,
9292
resdomno_target;
9393
RangeTblEntry *rte;
9494
char *target_colname;
95-
int16 attrtypmod,
95+
int32 attrtypmod,
9696
attrtypmod_target;
9797

9898
target_colname = *resname;
@@ -154,7 +154,7 @@ printf("transformTargetIdent- transform type %d to %d\n",
154154
if (expr == NULL)
155155
{
156156
char *name;
157-
int16 type_mod;
157+
int32 type_mod;
158158

159159
name = ((*resname != NULL)? *resname: colname);
160160

@@ -333,7 +333,7 @@ printf("transformTargetList: decode T_Expr\n");
333333
case T_Attr:
334334
{
335335
Oid type_id;
336-
int16 type_mod;
336+
int32 type_mod;
337337
Attr *att = (Attr *) res->val;
338338
Node *result;
339339
char *attrname;
@@ -507,7 +507,7 @@ Node *
507507
SizeTargetExpr(ParseState *pstate,
508508
Node *expr,
509509
Oid attrtype,
510-
int16 attrtypmod)
510+
int32 attrtypmod)
511511
{
512512
int i;
513513
HeapTuple ftup;
@@ -579,7 +579,7 @@ MakeTargetlistExpr(ParseState *pstate,
579579
{
580580
Oid type_id,
581581
attrtype;
582-
int16 type_mod,
582+
int32 type_mod,
583583
attrtypmod;
584584
int resdomno;
585585
Relation rd;

src/backend/parser/parse_type.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.11 1998/06/15 19:28:56 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.12 1998/07/12 21:29:21 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -138,7 +138,7 @@ typeTypeFlag(Type t)
138138
/* Given a type structure and a string, returns the internal form of
139139
that string */
140140
char *
141-
stringTypeString(Type tp, char *string, int16 atttypmod)
141+
stringTypeString(Type tp, char *string, int32 atttypmod)
142142
{
143143
Oid op;
144144
Oid typelem;

src/backend/utils/adt/arrayfuncs.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.30 1998/06/15 19:29:32 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.31 1998/07/12 21:29:22 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -45,7 +45,7 @@
4545
static int _ArrayCount(char *str, int dim[], int typdelim);
4646
static char *
4747
_ReadArrayStr(char *arrayStr, int nitems, int ndim, int dim[],
48-
FmgrInfo *inputproc, Oid typelem, int16 typmod,
48+
FmgrInfo *inputproc, Oid typelem, int32 typmod,
4949
char typdelim, int typlen, bool typbyval,
5050
char typalign, int *nbytes);
5151

@@ -94,7 +94,7 @@ static char *array_seek(char *ptr, int eltsize, int nitems);
9494
char *
9595
array_in(char *string, /* input array in external form */
9696
Oid element_type, /* type OID of an array element */
97-
int16 typmod)
97+
int32 typmod)
9898
{
9999
int typlen;
100100
bool typbyval,
@@ -360,7 +360,7 @@ _ReadArrayStr(char *arrayStr,
360360
FmgrInfo *inputproc, /* function used for the
361361
* conversion */
362362
Oid typelem,
363-
int16 typmod,
363+
int32 typmod,
364364
char typdelim,
365365
int typlen,
366366
bool typbyval,

src/backend/utils/adt/varchar.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.34 1998/06/16 06:41:50 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.35 1998/07/12 21:29:23 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -57,7 +57,7 @@ char *convertstr(char *, int, int);
5757
* because we pass typelem as the second argument for array_in.)
5858
*/
5959
char *
60-
bpcharin(char *s, int dummy, int16 atttypmod)
60+
bpcharin(char *s, int dummy, int32 atttypmod)
6161
{
6262
char *result,
6363
*r;
@@ -291,7 +291,7 @@ printf("bpchar- convert string length %d (%d) ->%d\n",
291291
* because we pass typelem as the second argument for array_in.)
292292
*/
293293
char *
294-
varcharin(char *s, int dummy, int16 atttypmod)
294+
varcharin(char *s, int dummy, int32 atttypmod)
295295
{
296296
char *result;
297297
int len;

src/backend/utils/cache/lsyscache.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.14 1998/06/15 19:29:40 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.15 1998/07/12 21:29:24 momjian Exp $
1111
*
1212
* NOTES
1313
* Eventually, the index information should go through here, too.
@@ -161,15 +161,15 @@ get_attisset(Oid relid, char *attname)
161161
* return the "atttypmod" field from the attribute relation.
162162
*
163163
*/
164-
int16
164+
int32
165165
get_atttypmod(Oid relid, AttrNumber attnum)
166166
{
167167
FormData_pg_attribute att_tup;
168168

169169
if (SearchSysCacheStruct(ATTNUM,
170170
(char *) &att_tup,
171171
ObjectIdGetDatum(relid),
172-
UInt16GetDatum(attnum),
172+
Int32GetDatum(attnum),
173173
0, 0))
174174
return att_tup.atttypmod;
175175
else

src/include/access/tupdesc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: tupdesc.h,v 1.16 1998/02/26 04:40:31 momjian Exp $
9+
* $Id: tupdesc.h,v 1.17 1998/07/12 21:29:26 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -70,7 +70,7 @@ TupleDescInitEntry(TupleDesc desc,
7070
AttrNumber attributeNumber,
7171
char *attributeName,
7272
Oid typeid,
73-
int16 typmod,
73+
int32 typmod,
7474
int attdim,
7575
bool attisset);
7676

0 commit comments

Comments
 (0)