diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-03-12 00:52:10 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-03-12 00:52:10 +0000 |
| commit | 6eeb95f0f56bb5e8a0a9328aeec04c9e6de87272 (patch) | |
| tree | 5f209c5926768472f9d4fd7210065c18831dbd9c /src/include/optimizer/planmain.h | |
| parent | 66b6bf67a197db73a880d2a4d9dab05168cde8e0 (diff) | |
| download | postgresql-6eeb95f0f56bb5e8a0a9328aeec04c9e6de87272.tar.gz | |
Restructure representation of join alias variables. An explicit JOIN
now has an RTE of its own, and references to its outputs now are Vars
referencing the JOIN RTE, rather than CASE-expressions. This allows
reverse-listing in ruleutils.c to use the correct alias easily, rather
than painfully reverse-engineering the alias namespace as it used to do.
Also, nested FULL JOINs work correctly, because the result of the inner
joins are simple Vars that the planner can cope with. This fixes a bug
reported a couple times now, notably by Tatsuo on 18-Nov-01. The alias
Vars are expanded into COALESCE expressions where needed at the very end
of planning, rather than during parsing.
Also, beginnings of support for showing plan qualifier expressions in
EXPLAIN. There are probably still cases that need work.
initdb forced due to change of stored-rule representation.
Diffstat (limited to 'src/include/optimizer/planmain.h')
| -rw-r--r-- | src/include/optimizer/planmain.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/include/optimizer/planmain.h b/src/include/optimizer/planmain.h index 37209dfd5c..919f3d23de 100644 --- a/src/include/optimizer/planmain.h +++ b/src/include/optimizer/planmain.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: planmain.h,v 1.54 2001/11/05 17:46:34 momjian Exp $ + * $Id: planmain.h,v 1.55 2002/03/12 00:52:03 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -47,18 +47,19 @@ extern Result *make_result(List *tlist, Node *resconstantqual, Plan *subplan); /* * prototypes for plan/initsplan.c */ +extern List *add_base_rels_to_query(Query *root, Node *jtnode); extern void build_base_rel_tlists(Query *root, List *tlist); extern Relids distribute_quals_to_rels(Query *root, Node *jtnode); -extern List *add_missing_rels_to_query(Query *root, Node *jtnode); extern void process_implied_equality(Query *root, Node *item1, Node *item2, Oid sortop1, Oid sortop2); /* * prototypes for plan/setrefs.c */ -extern void set_plan_references(Plan *plan); -extern List *join_references(List *clauses, List *outer_tlist, - List *inner_tlist, Index acceptable_rel); +extern void set_plan_references(Query *root, Plan *plan); +extern List *join_references(List *clauses, Query *root, + List *outer_tlist, List *inner_tlist, + Index acceptable_rel, Index join_rti); extern void fix_opids(Node *node); /* |
