diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-06-29 23:05:05 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-06-29 23:05:05 +0000 |
| commit | 835bb975d8d11268582d9dbd26b0eeaa62b60632 (patch) | |
| tree | 5d5d3d57acfe7627235aa72c28c37d8c85b210a3 /src/include/optimizer/plancat.h | |
| parent | cf883ea95c4bad69910300cbd6c0ef5cb84a9178 (diff) | |
| download | postgresql-835bb975d8d11268582d9dbd26b0eeaa62b60632.tar.gz | |
Restructure building of join relation targetlists so that a join plan
node emits only those vars that are actually needed above it in the
plan tree. (There were comments in the code suggesting that this was
done at some point in the dim past, but for a long time we have just
made join nodes emit everything that either input emitted.) Aside from
being marginally more efficient, this fixes the problem noted by Peter
Eisentraut where a join above an IN-implemented-as-join might fail,
because the subplan targetlist constructed in the latter case didn't
meet the expectation of including everything.
Along the way, fix some places that were O(N^2) in the targetlist
length. This is not all the trouble spots for wide queries by any
means, but it's a step forward.
Diffstat (limited to 'src/include/optimizer/plancat.h')
| -rw-r--r-- | src/include/optimizer/plancat.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/optimizer/plancat.h b/src/include/optimizer/plancat.h index c6b18ab0da..8f7cfbe6ce 100644 --- a/src/include/optimizer/plancat.h +++ b/src/include/optimizer/plancat.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: plancat.h,v 1.29 2003/02/03 15:07:08 tgl Exp $ + * $Id: plancat.h,v 1.30 2003/06/29 23:05:05 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -19,6 +19,8 @@ extern void get_relation_info(Oid relationObjectId, RelOptInfo *rel); +extern List *build_physical_tlist(Query *root, RelOptInfo *rel); + extern List *find_inheritance_children(Oid inhparent); extern bool has_subclass(Oid relationId); |
