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

Commitce0fb50

Browse files
committed
Make the system-attributes loop in AddNewAttributeTuples depend on
lengthof(SysAtt) not FirstLowInvalidHeapAttributeNumber, for consistency withthe other uses of the SysAtt array, and to make it clearer that it doesn'twalk off the end of that array.
1 parent5b5ee14 commitce0fb50

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

‎src/backend/catalog/heap.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.340 2008/09/30 10:52:12 heikki Exp $
11+
* $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.341 2008/10/14 23:27:40 tgl Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -551,7 +551,7 @@ AddNewAttributeTuples(Oid new_rel_oid,
551551
if (relkind!=RELKIND_VIEW&&relkind!=RELKIND_COMPOSITE_TYPE)
552552
{
553553
dpp=SysAtt;
554-
for (i=0;i<-1-FirstLowInvalidHeapAttributeNumber;i++)
554+
for (i=0;i<(int)lengthof(SysAtt);i++,dpp++)
555555
{
556556
if (tupdesc->tdhasoid||
557557
(*dpp)->attnum!=ObjectIdAttributeNumber)
@@ -587,7 +587,6 @@ AddNewAttributeTuples(Oid new_rel_oid,
587587

588588
heap_freetuple(tup);
589589
}
590-
dpp++;
591590
}
592591
}
593592

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp