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

Commit29737d8

Browse files
committed
AlterDatabaseSet() forgot to update the indexes on pg_database.
1 parent6e675d2 commit29737d8

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

‎src/backend/commands/dbcommands.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.91 2002/05/21 22:05:54 tgl Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.92 2002/05/25 16:30:59 tgl Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -505,6 +505,20 @@ AlterDatabaseSet(AlterDatabaseSetStmt *stmt)
505505
newtuple=heap_modifytuple(tuple,rel,repl_val,repl_null,repl_repl);
506506
simple_heap_update(rel,&tuple->t_self,newtuple);
507507

508+
/*
509+
* Update indexes
510+
*/
511+
if (RelationGetForm(rel)->relhasindex)
512+
{
513+
Relationidescs[Num_pg_database_indices];
514+
515+
CatalogOpenIndices(Num_pg_database_indices,
516+
Name_pg_database_indices,idescs);
517+
CatalogIndexInsert(idescs,Num_pg_database_indices,rel,
518+
newtuple);
519+
CatalogCloseIndices(Num_pg_database_indices,idescs);
520+
}
521+
508522
heap_endscan(scan);
509523
heap_close(rel,RowExclusiveLock);
510524
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp