|
6 | 6 | * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
7 | 7 | * Portions Copyright (c) 1994, Regents of the University of California
|
8 | 8 | *
|
9 |
| - * $Id: view.c,v 1.43 2000/06/12 19:40:40 momjian Exp $ |
| 9 | + * $Id: view.c,v 1.44 2000/06/30 07:06:05 tgl Exp $ |
10 | 10 | *
|
11 | 11 | *-------------------------------------------------------------------------
|
12 | 12 | */
|
@@ -109,7 +109,6 @@ DefineVirtualRelation(char *relname, List *tlist)
|
109 | 109 | *
|
110 | 110 | * Given a view name, returns the name for the 'on retrieve to "view"'
|
111 | 111 | * rule.
|
112 |
| - * This routine is called when defining/removing a view. |
113 | 112 | *------------------------------------------------------------------
|
114 | 113 | */
|
115 | 114 | char *
|
@@ -293,22 +292,9 @@ DefineView(char *viewName, Query *viewParse)
|
293 | 292 | void
|
294 | 293 | RemoveView(char *viewName)
|
295 | 294 | {
|
296 |
| - char *rname; |
297 |
| - |
298 |
| - /* |
299 |
| - * first remove all the "view" rules... Currently we only have one! |
300 |
| - */ |
301 |
| - rname = MakeRetrieveViewRuleName(viewName); |
302 |
| - RemoveRewriteRule(rname); |
303 |
| - |
304 |
| - /* |
305 |
| - * we don't really need that, but just in case... |
306 |
| - */ |
307 |
| - CommandCounterIncrement(); |
308 |
| - |
309 | 295 | /*
|
310 |
| - * now remove the relation. |
| 296 | + * We just have to drop the relation; the associated rules will |
| 297 | + * be cleaned up automatically. |
311 | 298 | */
|
312 | 299 | heap_drop_with_catalog(viewName);
|
313 |
| - pfree(rname); |
314 | 300 | }
|
0 commit comments