summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorTom Lane2001-01-05 06:34:23 +0000
committerTom Lane2001-01-05 06:34:23 +0000
commit2fb6cc904555024ef668f5ba096b5bf0ddd3ec26 (patch)
tree267b9c28722477567b05001e1e37cf03afc7dc09 /src/bin
parente62c38d0fccd16593ab2b126e97ea890ac646943 (diff)
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.
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/pgaccess/lib/help/create_table.hlp2
-rw-r--r--src/bin/pgaccess/lib/help/inheritance.hlp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/pgaccess/lib/help/create_table.hlp b/src/bin/pgaccess/lib/help/create_table.hlp
index b344edebd04..c55548bfb01 100644
--- a/src/bin/pgaccess/lib/help/create_table.hlp
+++ b/src/bin/pgaccess/lib/help/create_table.hlp
@@ -9,7 +9,7 @@ CREATE \[ TEMPORARY | TEMP \] TABLE table (
\[, PRIMARY KEY ( column \[, ...\] ) \]
\[, CHECK ( condition ) \]
\[, table_constraint_clause \]
- ) \[ UNDER inherited_table \[, ...\] \]
+ ) \[ INHERITS ( inherited_table \[, ...\] ) \]
" {code} "
TEMPORARY
The table is created only for this session, and is automatically dropped on session exit. Existing permanent tables with the same name are not visible while the temporary table exists.
diff --git a/src/bin/pgaccess/lib/help/inheritance.hlp b/src/bin/pgaccess/lib/help/inheritance.hlp
index 15e15cd744f..b402c30fdf5 100644
--- a/src/bin/pgaccess/lib/help/inheritance.hlp
+++ b/src/bin/pgaccess/lib/help/inheritance.hlp
@@ -11,7 +11,7 @@ Let's create two classes. The capitals class contains state capitals which are a
CREATE TABLE capitals (
state char2
- ) UNDER cities;
+ ) INHERITS (cities);
" {code} "
In this case, an instance of capitals inherits all attributes (name, population, and altitude) from its parent, cities. The type of the attribute name is text, a native Postgres type for variable length ASCII strings. The type of the attribute population is float, a native Postgres type for double precision floating point numbers. State capitals have an extra attribute, state, that shows their state. In Postgres, a class can inherit from zero or more other classes, and a query can reference either all instances of a class or all instances of a class plus all of its descendants.