OSDN Git Service

Remove query_planner's overhasty rejection of cases where
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 12 Jun 1999 19:38:30 +0000 (19:38 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 12 Jun 1999 19:38:30 +0000 (19:38 +0000)
commitaaf244247287b671db2d55098ed6aa774049a058
tree9f4486aef0bc1a6b6264a05a34e9ee71f0963915
parentacf242da971bdb2b47c5e23196b63ed079420b29
Remove query_planner's overhasty rejection of cases where
tlist and qual are NULL.  It ought to handle these the same as the cases
where tlist contains only constant expressions, ie, be willing to generate
a Result-node plan.  This did not use to matter, but it does now because
union_planner will flatten the tlist when aggregates are present.  Thus,
'select count(1) from table' now causes query_planner to be given a null
tlist, and to duplicate 6.4's behavior we need it to give back a Result
plan rather than refusing the query.  6.4 was arguably doing the Wrong
Thing for this query, but I'm not going to open a semantics issue right
before 6.5 release ... can revisit that problem later.
src/backend/optimizer/plan/planmain.c