diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-06-30 07:06:05 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-06-30 07:06:05 +0000 |
commit | 3513f4d162838c5c33ae89c30eac90b95e154f69 (patch) | |
tree | 1dcd02646310bce40bcb706494ede1f2322f7c02 /src/backend/commands/view.c | |
parent | b41f4ab8c448fc1bb13b52d00c9c4f1868d97941 (diff) | |
download | postgresql-3513f4d162838c5c33ae89c30eac90b95e154f69.tar.gz postgresql-3513f4d162838c5c33ae89c30eac90b95e154f69.zip |
RemoveView was doing things the hard way...
Diffstat (limited to 'src/backend/commands/view.c')
-rw-r--r-- | src/backend/commands/view.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/backend/commands/view.c b/src/backend/commands/view.c index cbe87b5e0ed..3b1bfedea23 100644 --- a/src/backend/commands/view.c +++ b/src/backend/commands/view.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: view.c,v 1.43 2000/06/12 19:40:40 momjian Exp $ + * $Id: view.c,v 1.44 2000/06/30 07:06:05 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -109,7 +109,6 @@ DefineVirtualRelation(char *relname, List *tlist) * * Given a view name, returns the name for the 'on retrieve to "view"' * rule. - * This routine is called when defining/removing a view. *------------------------------------------------------------------ */ char * @@ -293,22 +292,9 @@ DefineView(char *viewName, Query *viewParse) void RemoveView(char *viewName) { - char *rname; - - /* - * first remove all the "view" rules... Currently we only have one! - */ - rname = MakeRetrieveViewRuleName(viewName); - RemoveRewriteRule(rname); - - /* - * we don't really need that, but just in case... - */ - CommandCounterIncrement(); - /* - * now remove the relation. + * We just have to drop the relation; the associated rules will + * be cleaned up automatically. */ heap_drop_with_catalog(viewName); - pfree(rname); } |