diff options
| author | Bruce Momjian <bruce@momjian.us> | 1999-11-25 00:15:57 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 1999-11-25 00:15:57 +0000 |
| commit | 922e53e6ea6bf1baa2917c05e18539763e987821 (patch) | |
| tree | 3c2dcd08ab48a89b08420ba93d509e6b0f0ff5ff /src/backend/commands/rename.c | |
| parent | 8f401e804216ef03eaaa995b8a3d8b77d430b78a (diff) | |
| download | postgresql-922e53e6ea6bf1baa2917c05e18539763e987821.tar.gz | |
Enable pg_statistic cache use.
Diffstat (limited to 'src/backend/commands/rename.c')
| -rw-r--r-- | src/backend/commands/rename.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/backend/commands/rename.c b/src/backend/commands/rename.c index 288c9404c1..cf2c1a1bd0 100644 --- a/src/backend/commands/rename.c +++ b/src/backend/commands/rename.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.36 1999/11/24 00:44:30 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.37 1999/11/25 00:15:57 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -56,7 +56,6 @@ renameatt(char *relname, HeapTuple reltup, oldatttup, newatttup; - Relation irelations[Num_pg_attr_indices]; Oid relid; /* @@ -159,10 +158,13 @@ renameatt(char *relname, heap_update(attrelation, &oldatttup->t_self, oldatttup, NULL); /* keep system catalog indices current */ - CatalogOpenIndices(Num_pg_attr_indices, Name_pg_attr_indices, irelations); - CatalogIndexInsert(irelations, Num_pg_attr_indices, attrelation, oldatttup); - CatalogCloseIndices(Num_pg_attr_indices, irelations); - + { + Relation irelations[Num_pg_attr_indices]; + CatalogOpenIndices(Num_pg_attr_indices, Name_pg_attr_indices, irelations); + CatalogIndexInsert(irelations, Num_pg_attr_indices, attrelation, oldatttup); + CatalogCloseIndices(Num_pg_attr_indices, irelations); + } + pfree(oldatttup); heap_close(attrelation, RowExclusiveLock); } |
