From e549722a8b2fcc5b2ad9a9bd53948466ea5dae26 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 25 Feb 2009 03:30:38 +0000 Subject: 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. --- src/backend/nodes/copyfuncs.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'src/backend/nodes/copyfuncs.c') diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index 2175e0c0fc0..ef3d5fc3732 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -15,7 +15,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.424 2009/02/24 10:06:32 petere Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.425 2009/02/25 03:30:37 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1624,22 +1624,6 @@ _copyRestrictInfo(RestrictInfo *from) return newnode; } -/* - * _copyFlattenedSubLink - */ -static FlattenedSubLink * -_copyFlattenedSubLink(FlattenedSubLink *from) -{ - FlattenedSubLink *newnode = makeNode(FlattenedSubLink); - - COPY_SCALAR_FIELD(jointype); - COPY_BITMAPSET_FIELD(lefthand); - COPY_BITMAPSET_FIELD(righthand); - COPY_NODE_FIELD(quals); - - return newnode; -} - /* * _copyPlaceHolderVar */ @@ -3710,9 +3694,6 @@ copyObject(void *from) case T_RestrictInfo: retval = _copyRestrictInfo(from); break; - case T_FlattenedSubLink: - retval = _copyFlattenedSubLink(from); - break; case T_PlaceHolderVar: retval = _copyPlaceHolderVar(from); break; -- cgit v1.2.3