Skip to content
Snippets Groups Projects
Commit acf242da authored by Tom Lane's avatar Tom Lane
Browse files

Plug hole in dike: planner would coredump if query_planner

returned NULL, which it will do in some cases where an elog(ERROR) would
probably be more appropriate.  For the moment, generate a not-very-
informative error message rather than proceeding to certain coredump.
Probably ought to think about making query_planner elog instead of
returning NULL, but this is at least a safe change for now.
parent 1918a1d1
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.55 1999/06/06 17:38:10 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.56 1999/06/12 19:27:41 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -223,6 +223,10 @@ union_planner(Query *parse) ...@@ -223,6 +223,10 @@ union_planner(Query *parse)
pfree(vpm); pfree(vpm);
} }
/* query_planner returns NULL if it thinks plan is bogus */
if (! result_plan)
elog(ERROR, "union_planner: failed to create plan");
/* /*
* If we have a GROUP BY clause, insert a group node (with the * If we have a GROUP BY clause, insert a group node (with the
* appropriate sort node.) * appropriate sort node.)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment