postgresql/src/backend/parser
Tom Lane 0bd4da23a4 Ensure that typmod decoration on a datatype name is validated in all cases,
even in code paths where we don't pay any subsequent attention to the typmod
value.  This seems needed in view of the fact that 8.3's generalized typmod
support will accept a lot of bogus syntax, such as "timestamp(foo)" or
"record(int, 42)" --- if we allow such things to pass without comment,
users will get confused.  Per a recent example from Greg Stark.

To implement this in a way that's not very vulnerable to future
bugs-of-omission, refactor the API of parse_type.c's TypeName lookup routines
so that typmod validation is folded into the base lookup operation.  Callers
can still choose not to receive the encoded typmod, but we'll check the
decoration anyway if it's present.
2007-11-11 19:22:49 +00:00
..
.cvsignore Add .cvsignore file so cvs doesn't complain if you have lex/yacc 1999-03-21 02:43:58 +00:00
Makefile Separate parse-analysis for utility commands out of parser/analyze.c 2007-06-23 22:12:52 +00:00
README Separate parse-analysis for utility commands out of parser/analyze.c 2007-06-23 22:12:52 +00:00
analyze.c Tweak new error messages to match the actual syntax of DECLARE CURSOR. 2007-10-25 13:48:57 +00:00
gram.y Remove the hack in the grammar that "optimized away" DEFAULT NULL clauses. 2007-10-29 19:40:40 +00:00
keywords.c Remove "convert 'blah' using conversion_name" facility, because if it 2007-09-24 01:29:30 +00:00
parse_agg.c Fix up text concatenation so that it accepts all the reasonable cases that 2007-06-06 23:00:50 +00:00
parse_clause.c Separate parse-analysis for utility commands out of parser/analyze.c 2007-06-23 22:12:52 +00:00
parse_coerce.c Make eval_const_expressions() preserve typmod when simplifying something like 2007-09-06 17:31:58 +00:00
parse_expr.c Ensure that typmod decoration on a datatype name is validated in all cases, 2007-11-11 19:22:49 +00:00
parse_func.c Ensure that typmod decoration on a datatype name is validated in all cases, 2007-11-11 19:22:49 +00:00
parse_node.c Separate parse-analysis for utility commands out of parser/analyze.c 2007-06-23 22:12:52 +00:00
parse_oper.c Ensure that typmod decoration on a datatype name is validated in all cases, 2007-11-11 19:22:49 +00:00
parse_relation.c Ensure that typmod decoration on a datatype name is validated in all cases, 2007-11-11 19:22:49 +00:00
parse_target.c Fix Assert failure in ExpandColumnRefStar --- what I thought was a can't 2007-09-27 17:42:03 +00:00
parse_type.c Ensure that typmod decoration on a datatype name is validated in all cases, 2007-11-11 19:22:49 +00:00
parse_utilcmd.c Ensure that typmod decoration on a datatype name is validated in all cases, 2007-11-11 19:22:49 +00:00
parser.c Support ORDER BY ... NULLS FIRST/LAST, and add ASC/DESC/NULLS FIRST/NULLS LAST 2007-01-09 02:14:16 +00:00
scan.l Perform post-escaping encoding validity checks on SQL literals and COPY input 2007-09-12 20:49:27 +00:00
scansup.c Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00

README

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 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 type handling
parse_utilcmd.c	parse analysis for utility commands (done at execution time)