From cdeca5f590cc3c336c9c217831d68a2ca7f15265 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 4 Jul 2000 06:11:54 +0000 Subject: 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. --- src/backend/commands/creatinh.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/backend/commands/creatinh.c') diff --git a/src/backend/commands/creatinh.c b/src/backend/commands/creatinh.c index 401379f505c..1c49045330d 100644 --- a/src/backend/commands/creatinh.c +++ b/src/backend/commands/creatinh.c @@ -9,9 +9,9 @@ * * IDENTIFICATION <<<<<<< creatinh.c - * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.61 2000/06/12 03:40:29 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.62 2000/07/04 06:11:27 tgl Exp $ ======= - * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.61 2000/06/12 03:40:29 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.62 2000/07/04 06:11:27 tgl Exp $ >>>>>>> 1.58 * *------------------------------------------------------------------------- @@ -27,6 +27,7 @@ #include "catalog/pg_ipl.h" #include "catalog/pg_type.h" #include "commands/creatinh.h" +#include "miscadmin.h" #include "utils/syscache.h" /* ---------------- @@ -146,7 +147,8 @@ DefineRelation(CreateStmt *stmt, char relkind) } relationId = heap_create_with_catalog(relname, descriptor, - relkind, stmt->istemp); + relkind, stmt->istemp, + allowSystemTableMods); StoreCatalogInheritance(relationId, inheritList); @@ -224,7 +226,7 @@ void RemoveRelation(char *name) { AssertArg(name); - heap_drop_with_catalog(name); + heap_drop_with_catalog(name, allowSystemTableMods); } /* -- cgit v1.2.3