1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-07 19:06:32 +03:00

Make toast-table creation and deletion work somewhat reliably.

Don't go through pg_exec_query_dest(), but directly to the execution
routines.  Also, extend parameter lists so that there's no need to
change the global setting of allowSystemTableMods, a hack that was
certain to cause trouble in the event of any error.
This commit is contained in:
Tom Lane
2000-07-04 06:11:54 +00:00
parent 9cf327790d
commit cdeca5f590
18 changed files with 144 additions and 98 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.121 2000/06/30 07:04:17 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.122 2000/07/04 06:11:23 tgl Exp $
*
*
* INTERFACE ROUTINES
@@ -946,7 +946,8 @@ index_create(char *heapRelationName,
Node *predicate,
bool islossy,
bool unique,
bool primary)
bool primary,
bool allow_system_table_mods)
{
Relation heapRelation;
Relation indexRelation;
@@ -989,13 +990,13 @@ index_create(char *heapRelationName,
numatts,
attNums);
/* save user relation name because heap_create changes it */
if (istemp)
{
temp_relname = pstrdup(indexRelationName); /* save original value */
/* save user relation name because heap_create changes it */
temp_relname = pstrdup(indexRelationName); /* save original value */
indexRelationName = palloc(NAMEDATALEN);
strcpy(indexRelationName, temp_relname); /* heap_create will
* change this */
strcpy(indexRelationName, temp_relname); /* heap_create will
* change this */
}
/* ----------------
@@ -1003,7 +1004,7 @@ index_create(char *heapRelationName,
* ----------------
*/
indexRelation = heap_create(indexRelationName, indexTupDesc,
istemp, false);
istemp, false, allow_system_table_mods);
/* ----------------
* construct the index relation descriptor