mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +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:
@@ -22,7 +22,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.348 2009/02/24 10:06:32 petere Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.349 2009/02/25 03:30:37 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -766,17 +766,6 @@ _equalRestrictInfo(RestrictInfo *a, RestrictInfo *b)
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
_equalFlattenedSubLink(FlattenedSubLink *a, FlattenedSubLink *b)
|
||||
{
|
||||
COMPARE_SCALAR_FIELD(jointype);
|
||||
COMPARE_BITMAPSET_FIELD(lefthand);
|
||||
COMPARE_BITMAPSET_FIELD(righthand);
|
||||
COMPARE_NODE_FIELD(quals);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
_equalPlaceHolderVar(PlaceHolderVar *a, PlaceHolderVar *b)
|
||||
{
|
||||
@@ -2496,9 +2485,6 @@ equal(void *a, void *b)
|
||||
case T_RestrictInfo:
|
||||
retval = _equalRestrictInfo(a, b);
|
||||
break;
|
||||
case T_FlattenedSubLink:
|
||||
retval = _equalFlattenedSubLink(a, b);
|
||||
break;
|
||||
case T_PlaceHolderVar:
|
||||
retval = _equalPlaceHolderVar(a, b);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user