postgresql/src/backend/parser
Tom Lane b3eb4ea5d8 Add a new GUC parameter backslash_quote, which determines whether the SQL
parser will allow "\'" to be used to represent a literal quote mark.  The
"\'" representation has been deprecated for some time in favor of the
SQL-standard representation "''" (two single quote marks), but it has been
used often enough that just disallowing it immediately won't do.  Hence
backslash_quote allows the settings "on", "off", and "safe_encoding",
the last meaning to allow "\'" only if client_encoding is a valid server
encoding.  That is now the default, and the reason is that in encodings
such as SJIS that allow 0x5c (ASCII backslash) to be the last byte of a
multibyte character, accepting "\'" allows SQL-injection attacks as per
CVE-2006-2314 (further details will be published after release).  The
"on" setting is available for backward compatibility, but it must not be
used with clients that are exposed to untrusted input.

Thanks to Akio Ishida and Yasuo Ohgaki for identifying this security issue.
2006-05-21 20:10:42 +00:00
..
.cvsignore Add .cvsignore file so cvs doesn't complain if you have lex/yacc 1999-03-21 02:43:58 +00:00
analyze.c Improve the representation of FOR UPDATE/FOR SHARE so that we can 2006-04-30 18:30:40 +00:00
gram.y Improve the representation of FOR UPDATE/FOR SHARE so that we can 2006-04-30 18:30:40 +00:00
keywords.c Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
Makefile Remove the stub support we had for UNION JOIN; per discussion, this is 2006-03-07 01:00:19 +00:00
parse_agg.c Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
parse_clause.c Clean up representation of function RTEs for functions returning RECORD. 2006-03-16 00:31:55 +00:00
parse_coerce.c Simplify ParamListInfo data structure to support only numbered parameters, 2006-04-22 01:26:01 +00:00
parse_expr.c Simplify ParamListInfo data structure to support only numbered parameters, 2006-04-22 01:26:01 +00:00
parse_func.c Support the syntax 2006-04-15 17:45:46 +00:00
parse_node.c Improve parser so that we can show an error cursor position for errors 2006-03-14 22:48:25 +00:00
parse_oper.c Provide a namespace.c function for lookup of an operator with exact 2006-05-01 23:22:43 +00:00
parse_relation.c Improve the representation of FOR UPDATE/FOR SHARE so that we can 2006-04-30 18:30:40 +00:00
parse_target.c Add error location info to ResTarget parse nodes. Allows error cursor to be supplied 2006-03-23 00:19:30 +00:00
parse_type.c Improve the representation of FOR UPDATE/FOR SHARE so that we can 2006-04-30 18:30:40 +00:00
parser.c Remove the stub support we had for UNION JOIN; per discussion, this is 2006-03-07 01:00:19 +00:00
README cleanup 1998-08-23 14:43:46 +00:00
scan.l Add a new GUC parameter backslash_quote, which determines whether the SQL 2006-05-21 20:10:42 +00:00
scansup.c Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00

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

parser.c	things start here
scan.l		break query into tokens
scansup.c	handle escapes in input
keywords.c	turn keywords into specific tokens
gram.y		parse the tokens and fill query-type-specific structures
analyze.c	handle post-parse processing for each query type
parse_clause.c	handle clauses like WHERE, ORDER BY, GROUP BY, ...
parse_coerce.c	used for coercing expressions of different types
parse_expr.c	handle expressions like col, col + 3, x = 3 or x = 4
parse_oper.c	handle operations 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