head	1.11;
access;
symbols
	REL9_0_0:1.11
	REL9_1_ALPHA1:1.11
	REL9_0_RC1:1.11
	REL9_0_BETA4:1.11
	REL9_0_STABLE:1.11.0.8
	REL9_0_BETA3:1.11
	REL9_0_BETA2:1.11
	REL7_4_29:1.4
	REL8_0_25:1.4
	REL8_1_21:1.4
	REL8_2_17:1.4
	REL8_3_11:1.5
	REL8_4_4:1.10
	REL9_0_BETA1:1.11
	REL9_0_ALPHA5_BRANCH:1.11.0.6
	REL9_0_ALPHA5:1.11
	REL7_4_28:1.4
	REL8_0_24:1.4
	REL8_1_20:1.4
	REL8_2_16:1.4
	REL8_3_10:1.5
	REL8_4_3:1.10
	REL9_0_ALPHA4:1.11
	REL9_0_ALPHA4_BRANCH:1.11.0.4
	REL8_5_ALPHA3:1.11
	REL8_5_ALPHA3_BRANCH:1.11.0.2
	REL7_4_27:1.4
	REL8_0_23:1.4
	REL8_1_19:1.4
	REL8_2_15:1.4
	REL8_3_9:1.5
	REL8_4_2:1.10
	REL8_5_ALPHA2:1.10
	REL8_5_ALPHA2_BRANCH:1.10.0.6
	REL7_4_26:1.4
	REL8_0_22:1.4
	REL8_1_18:1.4
	REL8_2_14:1.4
	REL8_3_8:1.5
	REL8_4_1:1.10
	REL8_5_ALPHA1:1.10
	REL8_5_ALPHA1_BRANCH:1.10.0.4
	REL8_4_STABLE:1.10.0.2
	REL8_4_0:1.10
	REL8_4_RC2:1.10
	REL8_4_RC1:1.10
	REL8_4_BETA2:1.10
	REL8_4_BETA1:1.10
	REL7_4_25:1.4
	REL8_0_21:1.4
	REL8_1_17:1.4
	REL8_2_13:1.4
	REL8_3_7:1.5
	REL7_4_24:1.4
	REL8_0_20:1.4
	REL8_1_16:1.4
	REL8_2_12:1.4
	REL8_3_6:1.5
	REL7_4_23:1.4
	REL8_0_19:1.4
	REL8_1_15:1.4
	REL8_2_11:1.4
	REL8_3_5:1.5
	REL7_4_22:1.4
	REL8_0_18:1.4
	REL8_1_14:1.4
	REL8_2_10:1.4
	REL8_3_4:1.5
	REL7_4_21:1.4
	REL8_0_17:1.4
	REL8_1_13:1.4
	REL8_2_9:1.4
	REL8_3_3:1.5
	REL7_4_20:1.4
	REL8_0_16:1.4
	REL8_1_12:1.4
	REL8_2_8:1.4
	REL8_3_2:1.5
	REL8_2_7:1.4
	REL8_3_1:1.5
	REL8_3_STABLE:1.5.0.2
	REL8_3_0:1.5
	REL8_3_RC2:1.5
	REL7_3_21:1.4
	REL7_4_19:1.4
	REL8_0_15:1.4
	REL8_1_11:1.4
	REL8_2_6:1.4
	REL8_3_RC1:1.5
	REL8_3_BETA4:1.5
	REL8_3_BETA3:1.5
	REL8_3_BETA2:1.5
	REL8_3_BETA1:1.5
	REL7_3_20:1.4
	REL7_4_18:1.4
	REL8_0_14:1.4
	REL8_1_10:1.4
	REL8_2_5:1.4
	REL7_3_19:1.4
	REL7_4_17:1.4
	REL8_0_13:1.4
	REL8_1_9:1.4
	REL8_2_4:1.4
	REL8_0_12:1.4
	REL8_1_8:1.4
	REL8_2_3:1.4
	REL7_3_18:1.4
	REL7_4_16:1.4
	REL8_0_11:1.4
	REL8_1_7:1.4
	REL8_2_2:1.4
	REL8_0_10:1.4
	REL8_1_6:1.4
	REL8_2_1:1.4
	REL7_4_15:1.4
	REL7_3_17:1.4
	REL8_2_STABLE:1.4.0.24
	REL8_2_0:1.4
	REL8_2_RC1:1.4
	REL8_2_BETA3:1.4
	REL8_2_BETA2:1.4
	REL8_1_5:1.4
	REL8_0_9:1.4
	REL7_4_14:1.4
	REL7_3_16:1.4
	REL8_2_BETA1:1.4
	REL7_3_15:1.4
	REL7_4_13:1.4
	REL8_0_8:1.4
	REL8_1_4:1.4
	REL7_3_14:1.4
	REL7_4_12:1.4
	REL8_0_7:1.4
	REL8_1_3:1.4
	REL7_3_13:1.4
	REL7_4_11:1.4
	REL8_0_6:1.4
	REL8_1_2:1.4
	REL7_3_12:1.4
	REL7_4_10:1.4
	REL8_0_5:1.4
	REL8_1_1:1.4
	REL8_1_STABLE:1.4.0.22
	REL8_1_0:1.4
	REL8_1_0RC1:1.4
	REL8_1_0BETA4:1.4
	REL8_1_0BETA3:1.4
	REL7_3_11:1.4
	REL7_4_9:1.4
	REL8_0_4:1.4
	REL8_1_0BETA2:1.4
	REL8_1_0BETA1:1.4
	REL7_2_8:1.4
	REL7_3_10:1.4
	REL7_4_8:1.4
	REL8_0_3:1.4
	REL8_0_2:1.4
	REL7_2_7:1.4
	REL7_3_9:1.4
	REL7_4_7:1.4
	REL8_0_1:1.4
	REL8_0_STABLE:1.4.0.20
	REL8_0_0:1.4.0.18
	REL8_0_0RC5:1.4
	REL8_0_0RC4:1.4
	REL8_0_0RC3:1.4
	REL8_0_0RC2:1.4
	REL8_0_0RC1:1.4
	REL8_0_0BETA5:1.4
	REL8_0_0BETA4:1.4
	REL7_4_6:1.4
	REL7_3_8:1.4
	REL7_2_6:1.4
	REL8_0_0BETA3:1.4
	REL8_0_0BETA2:1.4
	REL7_2_5:1.4
	REL7_4_5:1.4
	REL7_3_7:1.4
	REL7_4_4:1.4
	REL8_0_0BETA1:1.4
	REL7_4_3:1.4
	REL7_4_2:1.4
	REL7_3_6:1.4
	REL7_4_1:1.4
	REL7_3_5:1.4
	REL7_4:1.4
	REL7_4_RC2:1.4
	REL7_4_STABLE:1.4.0.16
	REL7_4_RC1:1.4
	REL7_4_BETA5:1.4
	REL7_4_BETA4:1.4
	REL7_4_BETA3:1.4
	REL7_4_BETA2:1.4
	WIN32_DEV:1.4.0.14
	REL7_4_BETA1:1.4
	REL7_3_4:1.4
	REL7_3_2:1.4
	REL7_2_4:1.4
	REL7_3_STABLE:1.4.0.12
	REL7_2_3:1.4
	REL7_2_STABLE:1.4.0.10
	REL7_2:1.4
	REL7_2_RC2:1.4
	REL7_2_RC1:1.4
	REL7_2_BETA5:1.4
	REL7_2_BETA4:1.4
	REL7_2_BETA3:1.4
	REL7_2_BETA2:1.4
	REL7_2_BETA1:1.4
	REL7_1_2:1.4
	REL7_1_STABLE:1.4.0.8
	REL7_1_BETA:1.4
	REL7_1_BETA3:1.4
	REL7_1_BETA2:1.4
	REL7_1:1.4
	REL7_0_PATCHES:1.4.0.6
	REL7_0:1.4
	REL6_5_PATCHES:1.4.0.4
	REL6_5:1.4
	REL6_4:1.4.0.2
	release-6-3:1.3;
locks; strict;
comment	@# @;


1.11
date	2009.10.31.01.41.31;	author tgl;	state Exp;
branches;
next	1.10;

1.10
date	2008.04.09.01.00.46;	author momjian;	state Exp;
branches;
next	1.9;

1.9
date	2008.04.09.00.59.24;	author momjian;	state Exp;
branches;
next	1.8;

1.8
date	2008.04.09.00.55.30;	author momjian;	state Exp;
branches;
next	1.7;

1.7
date	2008.03.21.13.23.28;	author momjian;	state Exp;
branches;
next	1.6;

1.6
date	2008.03.20.17.55.14;	author momjian;	state Exp;
branches;
next	1.5;

1.5
date	2007.06.23.22.12.51;	author tgl;	state Exp;
branches;
next	1.4;

1.4
date	98.08.23.14.43.45;	author momjian;	state Exp;
branches;
next	1.3;

1.3
date	98.01.20.22.11.47;	author momjian;	state Exp;
branches;
next	1.2;

1.2
date	97.11.27.02.23.02;	author momjian;	state Exp;
branches;
next	1.1;

1.1
date	97.11.26.15.36.00;	author momjian;	state Exp;
branches;
next	;


desc
@@


1.11
log
@Implement parser hooks for processing ColumnRef and ParamRef nodes, as per my
recent proposal.  As proof of concept, remove knowledge of Params from the
core parser, arranging for them to be handled entirely by parser hook
functions.  It turns out we need an additional hook for that --- I had
forgotten about the code that handles inferring a parameter's type from
context.

This is a preliminary step towards letting plpgsql handle its variables
through parser hooks.  Additional work remains to be done to expose the
facility through SPI, but I think this is all the changes needed in the core
parser.
@
text
@$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
kwlookup.c	turn keywords into specific tokens
keywords.c	table of standard keywords (passed to kwlookup.c)
gram.y		parse the tokens and produce a "raw" parse tree
analyze.c	top level of parse analysis for optimizable queries
parse_agg.c	handle aggregates, like SUM(col1),  AVG(col2), ...
parse_clause.c	handle clauses like WHERE, ORDER BY, GROUP BY, ...
parse_coerce.c	handle coercing expressions to different data types
parse_cte.c	handle Common Table Expressions (WITH clauses)
parse_expr.c	handle expressions like col, col + 3, x = 3 or x = 4
parse_func.c	handle functions, table.column and column identifiers
parse_node.c	create nodes for various structures
parse_oper.c	handle operators in expressions
parse_param.c	handle Params (for the cases used in the core backend)
parse_relation.c support routines for tables and column handling
parse_target.c	handle the result list of the query
parse_type.c	support routines for data type handling
parse_utilcmd.c	parse analysis for utility commands (done at execution time)
@


1.10
log
@Small wording improvements for source code READMEs.
@
text
@d1 1
a1 1
$PostgreSQL: pgsql/src/backend/parser/README,v 1.9 2008/04/09 00:59:24 momjian Exp $
d13 3
a15 2
keywords.c	turn keywords into specific tokens
gram.y		parse the tokens and fill query-type-specific structures
d17 1
d20 1
a21 2
parse_oper.c	handle operators in expressions
parse_agg.c	handle aggregates, like SUM(col1),  AVG(col2), ...
d24 3
a27 1
parse_relation.c support routines for tables and column handling
@


1.9
log
@Revert README cleanups.
@
text
@d1 1
a1 1
$PostgreSQL: pgsql/src/backend/parser/README,v 1.7 2008/03/21 13:23:28 momjian Exp $
d17 1
a17 1
parse_coerce.c	handle coercing expressions to different types
d25 1
a25 1
parse_type.c	support routines for type handling
@


1.8
log
@Revert sentence removal from nickname in FAQ.
@
text
@d17 1
a17 1
parse_coerce.c	handle coercing expressions to different data types
d25 1
a25 1
parse_type.c	support routines for data type handling
@


1.7
log
@More README src cleanups.
@
text
@d1 1
a1 1
$PostgreSQL: pgsql/src/backend/parser/README,v 1.6 2008/03/20 17:55:14 momjian Exp $
d17 1
a17 1
parse_coerce.c	handle coercing expressions to different types
d25 1
a25 1
parse_type.c	support routines for type handling
@


1.6
log
@Make source code READMEs more consistent.  Add CVS tags to all README files.
@
text
@d1 1
a1 1
$PostgreSQL: pgsql/src/backend/access/gist/README,v 1.3 2005/09/16 14:40:54 teodor Exp $
d4 1
a4 1
------
@


1.5
log
@Separate parse-analysis for utility commands out of parser/analyze.c
(which now deals only in optimizable statements), and put that code
into a new file parser/parse_utilcmd.c.  This helps clarify and enforce
the design rule that utility statements shouldn't be processed during
the regular parse analysis phase; all interpretation of their meaning
should happen after they are given to ProcessUtility to execute.
(We need this because we don't retain any locks for a utility statement
that's in a plan cache, nor have any way to detect that it's stale.)

We are also able to simplify the API for parse_analyze() and related
routines, because they will now always return exactly one Query structure.

In passing, fix bug #3403 concerning trying to add a serial column to
an existing temp table (this is largely Heikki's work, but we needed
all that restructuring to make it safe).
@
text
@d1 5
@


1.4
log
@cleanup
@
text
@d2 1
a2 1
creates Query structures for the various complex queries that is passed
d7 1
a7 1
scansup.c	handle escapes in input
d10 1
a10 1
analyze.c	handle post-parse processing for each query type
d12 1
a12 1
parse_coerce.c	used for coercing expressions of different types
d14 1
a14 1
parse_oper.c	handle operations in expressions
d21 1
@


1.3
log
@Add Var.varlevelup to code.  More parser cleanup.
@
text
@d12 1
a16 1

@


1.2
log
@Cleaups of comments.
@
text
@d15 1
a15 1
parse_func.c	handle functions like date_part(col3), trim(col4), ...
@


1.1
log
@Add README for parser directory
@
text
@d10 1
a10 1
analyze.c	one function for every complex query type like SELECT, INSERT...
@
