From 5db2e83852cc3f25fdea48c4aa0da8696c88a826 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 28 Mar 2005 00:58:26 +0000 Subject: Rethink the order of expression preprocessing: eval_const_expressions really ought to run before canonicalize_qual, because it can now produce forms that canonicalize_qual knows how to improve (eg, NOT clauses). Also, because eval_const_expressions already knows about flattening nested ANDs and ORs into N-argument form, the initial flatten_andors pass in canonicalize_qual is now completely redundant and can be removed. This doesn't save a whole lot of code, but the time and palloc traffic eliminated is a useful gain on large expression trees. --- src/include/optimizer/prep.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/include') diff --git a/src/include/optimizer/prep.h b/src/include/optimizer/prep.h index 223c86eb1e5..6a86b2e174f 100644 --- a/src/include/optimizer/prep.h +++ b/src/include/optimizer/prep.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/optimizer/prep.h,v 1.48 2005/03/17 23:45:09 neilc Exp $ + * $PostgreSQL: pgsql/src/include/optimizer/prep.h,v 1.49 2005/03/28 00:58:26 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -37,7 +37,6 @@ extern Relids get_relids_for_join(Query *parse, int joinrelid); * prototypes for prepqual.c */ extern Expr *canonicalize_qual(Expr *qual); -extern Node *flatten_andors(Node *node); /* * prototypes for preptlist.c -- cgit v1.2.3