Remove not-really-standard implementation of CREATE TABLE's UNDER clause,
Tom Lane <tgl@sss.pgh.pa.us>
Remove not-really-standard implementation of CREATE TABLE's UNDER clause, and revert documentation to describe the existing INHERITS clause instead, per recent discussion in pghackers. Also fix implementation of SQL_inheritance SET variable: it is not cool to look at this var during the initial parsing phase, only during parse_analyze(). See recent bug report concerning misinterpretation of date constants just after a SET TIMEZONE command. gram.y really has to be an invariant transformation of the query string to a raw parsetree; anything that can vary with time must be done during parse analysis.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/advanced.sgml | modified | +17 −12 |
| doc/src/sgml/inherit.sgml | modified | +30 −25 |
| doc/src/sgml/ref/alter_table.sgml | modified | +3 −3 |
| doc/src/sgml/ref/create_table.sgml | modified | +20 −9 |
| src/backend/nodes/copyfuncs.c | modified | +6 −6 |
| src/backend/nodes/equalfuncs.c | modified | +6 −6 |
| src/backend/parser/analyze.c | modified | +5 −3 |
| src/backend/parser/gram.y | modified | +53 −63 |
| src/backend/parser/keywords.c | modified | +1 −2 |
| src/backend/parser/parse_clause.c | modified | +28 −2 |
| src/backend/tcop/utility.c | modified | +25 −9 |
| src/bin/pgaccess/lib/help/create_table.hlp | modified | +1 −1 |
| src/bin/pgaccess/lib/help/inheritance.hlp | modified | +1 −1 |
| src/include/nodes/parsenodes.h | modified | +16 −7 |
| src/include/parser/parse_clause.h | modified | +2 −1 |
| src/interfaces/ecpg/preproc/keywords.c | modified | +1 −2 |
| src/interfaces/ecpg/preproc/preproc.y | modified | +6 −15 |
| src/test/regress/expected/inherit.out | modified | +3 −3 |
| src/test/regress/sql/inherit.sql | modified | +3 −3 |