1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-17 06:41:09 +03:00

Get rid of the rather fuzzily defined FlattenedSubLink node type in favor of

making pull_up_sublinks() construct a full-blown JoinExpr tree representation
of IN/EXISTS SubLinks that it is able to convert to semi or anti joins.
This makes pull_up_sublinks() a shade more complex, but the gain in semantic
clarity is worth it.  I still have more to do in this area to address the
previously-discussed problems, but this commit in itself fixes at least one
bug in HEAD, as shown by added regression test case.
This commit is contained in:
Tom Lane
2009-02-25 03:30:38 +00:00
parent 7380b6384b
commit e549722a8b
18 changed files with 298 additions and 496 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.352 2009/02/06 23:43:23 tgl Exp $
* $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.353 2009/02/25 03:30:37 tgl Exp $
*
* NOTES
* Every node type that can appear in stored rules' parsetrees *must*
@ -1630,17 +1630,6 @@ _outInnerIndexscanInfo(StringInfo str, InnerIndexscanInfo *node)
WRITE_NODE_FIELD(cheapest_total_innerpath);
}
static void
_outFlattenedSubLink(StringInfo str, FlattenedSubLink *node)
{
WRITE_NODE_TYPE("FLATTENEDSUBLINK");
WRITE_ENUM_FIELD(jointype, JoinType);
WRITE_BITMAPSET_FIELD(lefthand);
WRITE_BITMAPSET_FIELD(righthand);
WRITE_NODE_FIELD(quals);
}
static void
_outPlaceHolderVar(StringInfo str, PlaceHolderVar *node)
{
@ -2660,9 +2649,6 @@ _outNode(StringInfo str, void *obj)
case T_InnerIndexscanInfo:
_outInnerIndexscanInfo(str, obj);
break;
case T_FlattenedSubLink:
_outFlattenedSubLink(str, obj);
break;
case T_PlaceHolderVar:
_outPlaceHolderVar(str, obj);
break;