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

Commitbdae359

Browse files
committed
Setting index' attributes attcacheoff to -1 in index_create().
1 parent5d4e3a7 commitbdae359

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎src/backend/catalog/index.c

Lines changed: 6 additions & 1 deletion
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.12 1997/03/19 07:44:45 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.13 1997/03/24 07:39:47 vadim Exp $
1111
*
1212
*
1313
* INTERFACE ROUTINES
@@ -414,6 +414,9 @@ ConstructTupleDescriptor(Oid heapoid,
414414

415415
to= (char*) (indexTupDesc->attrs[i ]);
416416
memcpy(to,from,ATTRIBUTE_TUPLE_SIZE);
417+
418+
((AttributeTupleForm)to)->attnum=i+1;
419+
((AttributeTupleForm)to)->attcacheoff=-1;
417420

418421
/* if the keytype is defined, we need to change the tuple form's
419422
atttypid & attlen field to match that of the key's type */
@@ -656,8 +659,10 @@ AppendAttributeTuples(Relation indexRelation, int numatts)
656659
* ----------------
657660
*/
658661
replace[Anum_pg_attribute_attnum-1 ]='r';
662+
replace[Anum_pg_attribute_attcacheoff-1 ]='r';
659663

660664
value[Anum_pg_attribute_attnum-1 ]=Int16GetDatum(1);
665+
value[Anum_pg_attribute_attcacheoff-1 ]=Int32GetDatum(-1);
661666

662667
tuple=heap_addheader(Natts_pg_attribute,
663668
sizeof*(indexRelation->rd_att->attrs[0]),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp