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

Commitb33f080

Browse files
committed
Atttypmod cleanups.
1 parent65faaf3 commitb33f080

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

‎src/backend/catalog/index.c

Lines changed: 4 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.37 1998/02/0706:10:49 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.38 1998/02/0721:41:48 momjian Exp $
1111
*
1212
*
1313
* INTERFACE ROUTINES
@@ -315,6 +315,8 @@ BuildFuncTupleDesc(FuncIndexInfo *funcInfo)
315315
funcTupDesc->attrs[0]->atttypid=retType;
316316
funcTupDesc->attrs[0]->attnum=1;
317317
funcTupDesc->attrs[0]->attbyval= ((TypeTupleForm)GETSTRUCT(tuple))->typbyval;
318+
funcTupDesc->attrs[0]->attcacheoff=-1;
319+
funcTupDesc->attrs[0]->atttypmod=-1;
318320

319321
/*
320322
* make the attributes name the same as the functions
@@ -433,10 +435,10 @@ ConstructTupleDescriptor(Oid heapoid,
433435
memcpy(to,from,ATTRIBUTE_TUPLE_SIZE);
434436

435437
((AttributeTupleForm)to)->attnum=i+1;
436-
((AttributeTupleForm)to)->attcacheoff=-1;
437438

438439
((AttributeTupleForm)to)->attnotnull= false;
439440
((AttributeTupleForm)to)->atthasdef= false;
441+
((AttributeTupleForm)to)->attcacheoff=-1;
440442
((AttributeTupleForm)to)->atttypmod=-1;
441443

442444
/*

‎src/backend/commands/command.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/commands/Attic/command.c,v 1.24 1998/01/16 23:19:33 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.25 1998/02/07 21:41:52 momjian Exp $
1111
*
1212
* NOTES
1313
* The PortalExecutorHeapMemory crap needs to be eliminated
@@ -419,8 +419,6 @@ PerformAddAttribute(char *relationName,
419419
(Datum)NULL);
420420

421421
attributeD.attrelid=reltup->t_oid;
422-
attributeD.attdisbursion=0;/* XXX temporary */
423-
attributeD.attcacheoff=-1;
424422

425423
attributeTuple=heap_addheader(Natts_pg_attribute,
426424
sizeofattributeD,
@@ -481,13 +479,15 @@ PerformAddAttribute(char *relationName,
481479
elog(ERROR,"Add: type \"%s\" nonexistent",p);
482480
}
483481
namestrcpy(&(attribute->attname), (char*)key[1].sk_argument);
482+
484483
attribute->atttypid=typeTuple->t_oid;
485484
attribute->attlen=form->typlen;
485+
attributeD.attdisbursion=0;
486+
attribute->attcacheoff=-1;
486487
attribute->atttypmod=colDef->typename->typmod;
487488
attribute->attnum=i;
488489
attribute->attbyval=form->typbyval;
489490
attribute->attnelems=attnelems;
490-
attribute->attcacheoff=-1;
491491
attribute->attisset= (bool) (form->typtype=='c');
492492
attribute->attalign=form->typalign;
493493
attribute->attnotnull= false;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp