mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
IN clauses appearing at top level of WHERE can now be handled as joins.
There are two implementation techniques: the executor understands a new JOIN_IN jointype, which emits at most one matching row per left-hand row, or the result of the IN's sub-select can be fed through a DISTINCT filter and then joined as an ordinary relation. Along the way, some minor code cleanup in the optimizer; notably, break out most of the jointree-rearrangement preprocessing in planner.c and put it in a new file prep/prepjointree.c.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: selfuncs.h,v 1.10 2002/11/19 23:22:00 tgl Exp $
|
||||
* $Id: selfuncs.h,v 1.11 2003/01/20 18:55:07 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -75,7 +75,7 @@ extern void mergejoinscansel(Query *root, Node *clause,
|
||||
Selectivity *leftscan,
|
||||
Selectivity *rightscan);
|
||||
|
||||
extern double estimate_num_groups(Query *root, List *groupClauses,
|
||||
extern double estimate_num_groups(Query *root, List *groupExprs,
|
||||
double input_rows);
|
||||
|
||||
extern Datum btcostestimate(PG_FUNCTION_ARGS);
|
||||
|
||||
Reference in New Issue
Block a user