|
5 | 5 | * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
6 | 6 | * Portions Copyright (c) 1994-5, Regents of the University of California
|
7 | 7 | *
|
8 |
| - * $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.63 2001/01/24 19:42:52 momjian Exp $ |
| 8 | + * $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.64 2001/01/27 01:41:19 tgl Exp $ |
9 | 9 | *
|
10 | 10 | */
|
11 | 11 |
|
@@ -54,7 +54,7 @@ ExplainQuery(Query *query, bool verbose, CommandDest dest)
|
54 | 54 | return;
|
55 | 55 | }
|
56 | 56 |
|
57 |
| -/* rewriterand plannerwill not cope with utility statements */ |
| 57 | +/* rewriter will not cope with utility statements */ |
58 | 58 | if (query->commandType==CMD_UTILITY)
|
59 | 59 | {
|
60 | 60 | elog(NOTICE,"Utility statements have no plan structure");
|
@@ -88,6 +88,16 @@ ExplainOneQuery(Query *query, bool verbose, CommandDest dest)
|
88 | 88 | Plan*plan;
|
89 | 89 | ExplainState*es;
|
90 | 90 |
|
| 91 | +/* planner will not cope with utility statements */ |
| 92 | +if (query->commandType==CMD_UTILITY) |
| 93 | +{ |
| 94 | +if (query->utilityStmt&&IsA(query->utilityStmt,NotifyStmt)) |
| 95 | +elog(NOTICE,"QUERY PLAN:\n\nNOTIFY\n"); |
| 96 | +else |
| 97 | +elog(NOTICE,"QUERY PLAN:\n\nUTILITY\n"); |
| 98 | +return; |
| 99 | +} |
| 100 | + |
91 | 101 | /* plan the query */
|
92 | 102 | plan=planner(query);
|
93 | 103 |
|
|