From: | tgl(at)postgresql(dot)org (Tom Lane) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Separate parse-analysis for utility commands out of |
Date: | 2007-06-23 22:12:52 |
Message-ID: | 20070623221252.927EE9FB2E5@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Log Message:
-----------
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).
Modified Files:
--------------
pgsql/src/backend/commands:
indexcmds.c (r1.159 -> r1.160)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/indexcmds.c.diff?r1=1.159&r2=1.160)
prepare.c (r1.76 -> r1.77)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/prepare.c.diff?r1=1.76&r2=1.77)
schemacmds.c (r1.45 -> r1.46)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/schemacmds.c.diff?r1=1.45&r2=1.46)
tablecmds.c (r1.227 -> r1.228)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c.diff?r1=1.227&r2=1.228)
view.c (r1.100 -> r1.101)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/view.c.diff?r1=1.100&r2=1.101)
pgsql/src/backend/nodes:
makefuncs.c (r1.55 -> r1.56)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/makefuncs.c.diff?r1=1.55&r2=1.56)
pgsql/src/backend/optimizer/util:
clauses.c (r1.246 -> r1.247)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/clauses.c.diff?r1=1.246&r2=1.247)
pgsql/src/backend/parser:
Makefile (r1.44 -> r1.45)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/Makefile.diff?r1=1.44&r2=1.45)
README (r1.4 -> r1.5)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/README.diff?r1=1.4&r2=1.5)
analyze.c (r1.366 -> r1.367)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/analyze.c.diff?r1=1.366&r2=1.367)
gram.y (r2.595 -> r2.596)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/gram.y.diff?r1=2.595&r2=2.596)
parse_clause.c (r1.165 -> r1.166)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_clause.c.diff?r1=1.165&r2=1.166)
parse_expr.c (r1.220 -> r1.221)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_expr.c.diff?r1=1.220&r2=1.221)
parse_node.c (r1.97 -> r1.98)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_node.c.diff?r1=1.97&r2=1.98)
pgsql/src/backend/rewrite:
rewriteDefine.c (r1.120 -> r1.121)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/rewrite/rewriteDefine.c.diff?r1=1.120&r2=1.121)
pgsql/src/backend/tcop:
postgres.c (r1.533 -> r1.534)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/tcop/postgres.c.diff?r1=1.533&r2=1.534)
utility.c (r1.280 -> r1.281)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/tcop/utility.c.diff?r1=1.280&r2=1.281)
pgsql/src/include/nodes:
makefuncs.h (r1.58 -> r1.59)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/makefuncs.h.diff?r1=1.58&r2=1.59)
parsenodes.h (r1.348 -> r1.349)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/parsenodes.h.diff?r1=1.348&r2=1.349)
pgsql/src/include/parser:
analyze.h (r1.36 -> r1.37)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/parser/analyze.h.diff?r1=1.36&r2=1.37)
parse_node.h (r1.51 -> r1.52)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/parser/parse_node.h.diff?r1=1.51&r2=1.52)
Added Files:
-----------
pgsql/src/backend/parser:
parse_utilcmd.c (r2.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_utilcmd.c?rev=2.1&content-type=text/x-cvsweb-markup)
pgsql/src/include/parser:
parse_utilcmd.h (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/parser/parse_utilcmd.h?rev=1.1&content-type=text/x-cvsweb-markup)
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2007-06-25 16:09:03 | pgsql: Improve autovacuum launcher's ability to detect a problem in |
Previous Message | User Jmduarte | 2007-06-22 20:21:56 | mysql2pgsql - mysql2pgsql: Moved everything to directory mysql2pgsql, |