mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
Small cleanup of temp-table handling. Disallow creation of a non-temp
table that inherits from a temp table. Make sure the right things happen if one creates a temp table, creates another temp that inherits from it, then renames the first one. (Previously, system would end up trying to delete the temp tables in the wrong order.)
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.132 2000/12/09 20:31:43 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.133 2000/12/22 23:12:03 tgl Exp $
|
||||
*
|
||||
*
|
||||
* INTERFACE ROUTINES
|
||||
@@ -145,7 +145,7 @@ GetHeapRelationOid(char *heapRelationName, char *indexRelationName, bool istemp)
|
||||
indoid = RelnameFindRelid(indexRelationName);
|
||||
|
||||
if ((!istemp && OidIsValid(indoid)) ||
|
||||
(istemp && get_temp_rel_by_username(indexRelationName) != NULL))
|
||||
(istemp && is_temp_rel_name(indexRelationName)))
|
||||
elog(ERROR, "Cannot create index: '%s' already exists",
|
||||
indexRelationName);
|
||||
|
||||
@@ -885,7 +885,7 @@ index_create(char *heapRelationName,
|
||||
TupleDesc indexTupDesc;
|
||||
Oid heapoid;
|
||||
Oid indexoid;
|
||||
bool istemp = (get_temp_rel_by_username(heapRelationName) != NULL);
|
||||
bool istemp = is_temp_rel_name(heapRelationName);
|
||||
char *temp_relname = NULL;
|
||||
|
||||
SetReindexProcessing(false);
|
||||
|
||||
Reference in New Issue
Block a user