Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit683f399

Browse files
committed
Change atttypmod from int16 to int32, for Thomas.
1 parent647bbfb commit683f399

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
AttrNumberattributeNumber,
256256
char*attributeName,
257257
Oidtypeid,
258-
int16typmod,
258+
int32typmod,
259259
intattdim,
260260
boolattisset)
261261
{
@@ -448,7 +448,7 @@ BuildDescForRelation(List *schema, char *relname)
448448
TupleConstr*constr= (TupleConstr*)palloc(sizeof(TupleConstr));
449449
char*attname;
450450
char*typename;
451-
int16atttypmod;
451+
int32atttypmod;
452452
intattdim;
453453
intndef=0;
454454
boolattisset;

‎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
*AttrNumberattnum;
108108
*uint32attnelems;
109109
*int32attcacheoff;
110-
*int16atttypmod;
110+
*int32atttypmod;
111111
*boolattbyval;
112112
*boolattisset;
113113
*charattalign;

‎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
Oidout_func_oid;
207207
Oid*elements;
208-
int16*typmod;
208+
int32*typmod;
209209
Datumvalue;
210210
boolisnull;/* 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
boolreading_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(Indexvarno,
5454
AttrNumbervarattno,
5555
Oidvartype,
56-
int16vartypmod,
56+
int32vartypmod,
5757
Indexvarlevelsup,
5858
Indexvarnoold,
5959
AttrNumbervaroattno)
@@ -78,7 +78,7 @@ makeVar(Index varno,
7878
Resdom*
7979
makeResdom(AttrNumberresno,
8080
Oidrestype,
81-
int16restypmod,
81+
int32restypmod,
8282
char*resname,
8383
Indexreskey,
8484
Oidreskeyop,

‎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-
staticNode*parser_typecast(Value*expr,TypeName*typename,int16atttypmod);
34+
staticNode*parser_typecast(Value*expr,TypeName*typename,int32atttypmod);
3535

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

435435
staticNode*
436-
parser_typecast(Value*expr,TypeName*typename,int16atttypmod)
436+
parser_typecast(Value*expr,TypeName*typename,int32atttypmod)
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,OidexprType,Typetp,int16atttypmod)
516+
parser_typecast2(Node*expr,OidexprType,Typetp,int32atttypmod)
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
Oidtypeid;
1223-
int16type_mod;
1223+
int32type_mod;
12241224
intattno;
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
intvnum,
223223
attid;
224224
Oidvartypeid;
225-
int16type_mod;
225+
int32type_mod;
226226
intsublevels_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
Oidattrtype,
44-
int16attrtypmod);
44+
int32attrtypmod);
4545

4646

4747
/* transformTargetIdent()
@@ -92,7 +92,7 @@ transformTargetIdent(ParseState *pstate,
9292
resdomno_target;
9393
RangeTblEntry*rte;
9494
char*target_colname;
95-
int16attrtypmod,
95+
int32attrtypmod,
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-
int16type_mod;
157+
int32type_mod;
158158

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

@@ -333,7 +333,7 @@ printf("transformTargetList: decode T_Expr\n");
333333
caseT_Attr:
334334
{
335335
Oidtype_id;
336-
int16type_mod;
336+
int32type_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
Oidattrtype,
510-
int16attrtypmod)
510+
int32attrtypmod)
511511
{
512512
inti;
513513
HeapTupleftup;
@@ -579,7 +579,7 @@ MakeTargetlistExpr(ParseState *pstate,
579579
{
580580
Oidtype_id,
581581
attrtype;
582-
int16type_mod,
582+
int32type_mod,
583583
attrtypmod;
584584
intresdomno;
585585
Relationrd;

‎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(Typetp,char*string,int16atttypmod)
141+
stringTypeString(Typetp,char*string,int32atttypmod)
142142
{
143143
Oidop;
144144
Oidtypelem;

‎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
staticint_ArrayCount(char*str,intdim[],inttypdelim);
4646
staticchar*
4747
_ReadArrayStr(char*arrayStr,intnitems,intndim,intdim[],
48-
FmgrInfo*inputproc,Oidtypelem,int16typmod,
48+
FmgrInfo*inputproc,Oidtypelem,int32typmod,
4949
chartypdelim,inttyplen,booltypbyval,
5050
chartypalign,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
Oidelement_type,/* type OID of an array element */
97-
int16typmod)
97+
int32typmod)
9898
{
9999
inttyplen;
100100
booltypbyval,
@@ -360,7 +360,7 @@ _ReadArrayStr(char *arrayStr,
360360
FmgrInfo*inputproc,/* function used for the
361361
* conversion */
362362
Oidtypelem,
363-
int16typmod,
363+
int32typmod,
364364
chartypdelim,
365365
inttyplen,
366366
booltypbyval,

‎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,intdummy,int16atttypmod)
60+
bpcharin(char*s,intdummy,int32atttypmod)
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,intdummy,int16atttypmod)
294+
varcharin(char*s,intdummy,int32atttypmod)
295295
{
296296
char*result;
297297
intlen;

‎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(Oidrelid,AttrNumberattnum)
166166
{
167167
FormData_pg_attributeatt_tup;
168168

169169
if (SearchSysCacheStruct(ATTNUM,
170170
(char*)&att_tup,
171171
ObjectIdGetDatum(relid),
172-
UInt16GetDatum(attnum),
172+
Int32GetDatum(attnum),
173173
0,0))
174174
returnatt_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
AttrNumberattributeNumber,
7171
char*attributeName,
7272
Oidtypeid,
73-
int16typmod,
73+
int32typmod,
7474
intattdim,
7575
boolattisset);
7676

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp