mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
First cut at doing something reasonable with OR-of-ANDs WHERE
conditions. There are some pretty bogus heuristics in prepqual.c that try to decide whether to output CNF or DNF format; they need to be replaced, likely. Right now the code is probably too willing to choose DNF form, which might hurt performance in some cases that used to work OK. But at least we have a foundation to build on.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.66 1999/08/26 05:07:41 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.67 1999/09/13 00:17:25 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -324,8 +324,9 @@ union_planner(Query *parse)
|
||||
elog(ERROR, "Sub-SELECT in HAVING clause must use only GROUPed attributes from outer SELECT");
|
||||
}
|
||||
|
||||
/* convert the havingQual to conjunctive normal form (cnf) */
|
||||
parse->havingQual = (Node *) cnfify((Expr *) parse->havingQual, true);
|
||||
/* convert the havingQual to implicit-AND normal form */
|
||||
parse->havingQual = (Node *)
|
||||
canonicalize_qual((Expr *) parse->havingQual, true);
|
||||
|
||||
/*
|
||||
* Require an aggregate function to appear in each clause of the
|
||||
|
Reference in New Issue
Block a user