diff options
Diffstat (limited to 'src/backend/commands/view.c')
-rw-r--r-- | src/backend/commands/view.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/backend/commands/view.c b/src/backend/commands/view.c index d27350fd467..519df157184 100644 --- a/src/backend/commands/view.c +++ b/src/backend/commands/view.c @@ -6,13 +6,14 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: view.c,v 1.65 2002/07/01 15:27:49 tgl Exp $ + * $Id: view.c,v 1.66 2002/07/12 18:43:16 tgl Exp $ * *------------------------------------------------------------------------- */ #include "postgres.h" #include "access/xact.h" +#include "catalog/dependency.h" #include "catalog/heap.h" #include "catalog/namespace.h" #include "commands/tablecmds.h" @@ -252,16 +253,21 @@ DefineView(const RangeVar *view, Query *viewParse) * RemoveView * * Remove a view given its name + * + * We just have to drop the relation; the associated rules will be + * cleaned up automatically. */ void RemoveView(const RangeVar *view, DropBehavior behavior) { Oid viewOid; + ObjectAddress object; viewOid = RangeVarGetRelid(view, false); - /* - * We just have to drop the relation; the associated rules will be - * cleaned up automatically. - */ - heap_drop_with_catalog(viewOid, allowSystemTableMods); + + object.classId = RelOid_pg_class; + object.objectId = viewOid; + object.objectSubId = 0; + + performDeletion(&object, behavior); } |