1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-06 07:49:08 +03:00

Change the parser to translate "foo [NOT] IN (expression-list)" to

ScalarArrayOpExpr when possible, that is, whenever there is an array type
for the values of the expression list.  This completes the project I've
been working on to improve the speed of index searches with long IN lists,
as per discussion back in mid-October.

I did not force initdb, but until you do one you will see failures in the
"rules" regression test, because some of the standard system views use IN
and their compiled formats have changed.
This commit is contained in:
Tom Lane
2005-11-28 04:35:32 +00:00
parent 8a9acd3c41
commit 3d376fce8d
5 changed files with 212 additions and 103 deletions

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.296 2005/11/22 18:17:31 momjian Exp $
* $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.297 2005/11/28 04:35:32 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -194,7 +194,8 @@ typedef enum A_Expr_Kind
AEXPR_OP_ALL, /* scalar op ALL (array) */
AEXPR_DISTINCT, /* IS DISTINCT FROM - name must be "=" */
AEXPR_NULLIF, /* NULLIF - name must be "=" */
AEXPR_OF /* IS (not) OF - name must be "=" or "!=" */
AEXPR_OF, /* IS [NOT] OF - name must be "=" or "<>" */
AEXPR_IN /* [NOT] IN - name must be "=" or "<>" */
} A_Expr_Kind;
typedef struct A_Expr