postgresql/src/backend/parser
Tom Lane ddbe8dca08 Add a heuristic to transformAExprIn() to make it prefer expanding "x IN (list)"
into an OR of equality comparisons, rather than x = ANY(ARRAY[...]), when there
are Vars in the right-hand side.  This avoids a performance regression compared
to pre-8.2 releases, in cases where the OR form can be optimized into scans
of multiple indexes.  Limit the possible downside by preferring this form only
when the list isn't very long (I set the cutoff at 32 elements, which is a
bit arbitrary but in the right ballpark).  Per discussion with Jim Nasby.

In passing, also make it try the OR form if it cannot select a common type
for the array elements; we've seen a complaint or two about how the OR form
worked for such cases and ARRAY doesn't.
2008-10-25 17:19:09 +00:00
..
.cvsignore Remove all traces that suggest that a non-Bison yacc might be supported, and 2008-08-29 13:02:33 +00:00
analyze.c Improve parser error location for cases where an INSERT or UPDATE command 2008-10-07 01:47:55 +00:00
gram.y SQL:2008 alternative syntax for LIMIT/OFFSET: 2008-10-22 11:00:34 +00:00
keywords.c SQL:2008 alternative syntax for LIMIT/OFFSET: 2008-10-22 11:00:34 +00:00
Makefile Implement SQL-standard WITH clauses, including WITH RECURSIVE. 2008-10-04 21:56:55 +00:00
parse_agg.c Implement SQL-standard WITH clauses, including WITH RECURSIVE. 2008-10-04 21:56:55 +00:00
parse_clause.c Fix the implicit-RTE code to be able to handle implicit RTEs for CTEs, as 2008-10-06 02:12:56 +00:00
parse_coerce.c Add a heuristic to transformAExprIn() to make it prefer expanding "x IN (list)" 2008-10-25 17:19:09 +00:00
parse_cte.c Modify the parser's error reporting to include a specific hint for the case 2008-10-08 01:14:44 +00:00
parse_expr.c Add a heuristic to transformAExprIn() to make it prefer expanding "x IN (list)" 2008-10-25 17:19:09 +00:00
parse_func.c Add a bunch of new error location reports to parse-analysis error messages. 2008-09-01 20:42:46 +00:00
parse_node.c Add a bunch of new error location reports to parse-analysis error messages. 2008-09-01 20:42:46 +00:00
parse_oper.c Improve the plan cache invalidation mechanism to make it invalidate plans 2008-09-09 18:58:09 +00:00
parse_relation.c Modify the parser's error reporting to include a specific hint for the case 2008-10-08 01:14:44 +00:00
parse_target.c Improve parser error location for cases where an INSERT or UPDATE command 2008-10-07 01:47:55 +00:00
parse_type.c Implement SQL-standard WITH clauses, including WITH RECURSIVE. 2008-10-04 21:56:55 +00:00
parse_utilcmd.c Add a bunch of new error location reports to parse-analysis error messages. 2008-09-01 20:42:46 +00:00
parser.c Remove all traces that suggest that a non-Bison yacc might be supported, and 2008-08-29 13:02:33 +00:00
README Small wording improvements for source code READMEs. 2008-04-09 01:00:46 +00:00
scan.l Add a bunch of new error location reports to parse-analysis error messages. 2008-09-01 20:42:46 +00:00
scansup.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00

$PostgreSQL: pgsql/src/backend/parser/README,v 1.10 2008/04/09 01:00:46 momjian Exp $

Parser
======

This directory does more than tokenize and parse SQL queries.  It also
creates Query structures for the various complex queries that are passed
to the optimizer and then executor.

parser.c	things start here
scan.l		break query into tokens
scansup.c	handle escapes in input strings
keywords.c	turn keywords into specific tokens
gram.y		parse the tokens and fill query-type-specific structures
analyze.c	top level of parse analysis for optimizable queries
parse_clause.c	handle clauses like WHERE, ORDER BY, GROUP BY, ...
parse_coerce.c	handle coercing expressions to different data types
parse_expr.c	handle expressions like col, col + 3, x = 3 or x = 4
parse_oper.c	handle operators in expressions
parse_agg.c	handle aggregates, like SUM(col1),  AVG(col2), ...
parse_func.c	handle functions, table.column and column identifiers
parse_node.c	create nodes for various structures
parse_target.c	handle the result list of the query
parse_relation.c support routines for tables and column handling
parse_type.c	support routines for data type handling
parse_utilcmd.c	parse analysis for utility commands (done at execution time)