mirror of
https://github.com/postgres/postgres.git
synced 2025-06-17 17:02:08 +03:00
AlterDatabaseSet() forgot to update the indexes on pg_database.
This commit is contained in:
@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.91 2002/05/21 22:05:54 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.92 2002/05/25 16:30:59 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -505,6 +505,20 @@ AlterDatabaseSet(AlterDatabaseSetStmt *stmt)
|
|||||||
newtuple = heap_modifytuple(tuple, rel, repl_val, repl_null, repl_repl);
|
newtuple = heap_modifytuple(tuple, rel, repl_val, repl_null, repl_repl);
|
||||||
simple_heap_update(rel, &tuple->t_self, newtuple);
|
simple_heap_update(rel, &tuple->t_self, newtuple);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Update indexes
|
||||||
|
*/
|
||||||
|
if (RelationGetForm(rel)->relhasindex)
|
||||||
|
{
|
||||||
|
Relation idescs[Num_pg_database_indices];
|
||||||
|
|
||||||
|
CatalogOpenIndices(Num_pg_database_indices,
|
||||||
|
Name_pg_database_indices, idescs);
|
||||||
|
CatalogIndexInsert(idescs, Num_pg_database_indices, rel,
|
||||||
|
newtuple);
|
||||||
|
CatalogCloseIndices(Num_pg_database_indices, idescs);
|
||||||
|
}
|
||||||
|
|
||||||
heap_endscan(scan);
|
heap_endscan(scan);
|
||||||
heap_close(rel, RowExclusiveLock);
|
heap_close(rel, RowExclusiveLock);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user