mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
Get rid of adjust_appendrel_attr_needed(), which has been broken ever since
we extended the appendrel mechanism to support UNION ALL optimization. The reason nobody noticed was that we are not actually using attr_needed data for appendrel children; hence it seems more reasonable to rip it out than fix it. Back-patch to 8.2 because an Assert failure is possible in corner cases. Per examination of an example from Jim Nasby. In HEAD, also get rid of AppendRelInfo.col_mappings, which is quite inadequate to represent UNION ALL situations; depend entirely on translated_vars instead.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/optimizer/prep.h,v 1.62 2008/08/17 01:20:00 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/optimizer/prep.h,v 1.63 2008/11/11 18:13:32 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -51,9 +51,4 @@ extern void expand_inherited_tables(PlannerInfo *root);
|
||||
|
||||
extern Node *adjust_appendrel_attrs(Node *node, AppendRelInfo *appinfo);
|
||||
|
||||
extern Relids *adjust_appendrel_attr_needed(RelOptInfo *oldrel,
|
||||
AppendRelInfo *appinfo,
|
||||
AttrNumber new_min_attr,
|
||||
AttrNumber new_max_attr);
|
||||
|
||||
#endif /* PREP_H */
|
||||
|
||||
Reference in New Issue
Block a user