diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-01-09 20:50:53 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-01-09 20:50:53 +0000 |
commit | 6bc61fc046961cfc2b3901ab38ac74b45f8c6cd3 (patch) | |
tree | a29a0825d52ba55e9971b8df6c4a530cc90a5bff /src/backend/nodes/readfuncs.c | |
parent | 59779c81ba9e6ea29cec1a59d0cfdbe76fa016ff (diff) | |
download | postgresql-6bc61fc046961cfc2b3901ab38ac74b45f8c6cd3.tar.gz postgresql-6bc61fc046961cfc2b3901ab38ac74b45f8c6cd3.zip |
Adjust parser so that 'x NOT IN (subselect)' is converted to
'NOT (x IN (subselect))', that is 'NOT (x = ANY (subselect))',
rather than 'x <> ALL (subselect)' as we formerly did. This
opens the door to optimizing NOT IN the same way as IN, whereas
there's no hope of optimizing the expression using <>. Also,
convert 'x <> ALL (subselect)' to the NOT(IN) style, so that
the optimization will be available when processing rules dumped
by older Postgres versions.
initdb forced due to small change in SubLink node representation.
Diffstat (limited to 'src/backend/nodes/readfuncs.c')
-rw-r--r-- | src/backend/nodes/readfuncs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/nodes/readfuncs.c b/src/backend/nodes/readfuncs.c index 9ecd40f2e1d..99afc0438c3 100644 --- a/src/backend/nodes/readfuncs.c +++ b/src/backend/nodes/readfuncs.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.144 2002/12/14 00:17:54 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.145 2003/01/09 20:50:51 tgl Exp $ * * NOTES * Path and Plan nodes do not have any readfuncs support, because we @@ -531,7 +531,8 @@ _readSubLink(void) READ_LOCALS(SubLink); READ_ENUM_FIELD(subLinkType, SubLinkType); - READ_BOOL_FIELD(useor); + READ_BOOL_FIELD(operIsEquals); + READ_BOOL_FIELD(useOr); READ_NODE_FIELD(lefthand); READ_NODE_FIELD(oper); READ_NODE_FIELD(subselect); |