From e9cda08b2b79303e36594e1d4e5e09ea2db84b6a Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 12 Jun 2003 07:49:43 +0000 Subject: Brief note about sequence cache not being cleared in other backends. Actually clear the cache in the backend making the alteration. This follows in the footsteps of setval(). Rod Taylor --- doc/src/sgml/keywords.sgml | 20 +++++++++++++++++++- doc/src/sgml/ref/alter_sequence.sgml | 8 +++++++- doc/src/sgml/ref/create_table.sgml | 25 +++++++++++++++++++++++-- 3 files changed, 49 insertions(+), 4 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/keywords.sgml b/doc/src/sgml/keywords.sgml index 783b401e3f2..26764553f87 100644 --- a/doc/src/sgml/keywords.sgml +++ b/doc/src/sgml/keywords.sgml @@ -1,4 +1,4 @@ - + <acronym>SQL</acronym> Key Words @@ -872,6 +872,12 @@ reserved reserved + + DEFAULTS + non-reserved + + + DEFERRABLE reserved @@ -1100,6 +1106,12 @@ reserved reserved + + EXCLUDING + non-reserved + + + EXCLUSIVE non-reserved @@ -1394,6 +1406,12 @@ reserved reserved + + INCLUDING + non-reserved + + + INCREMENT non-reserved diff --git a/doc/src/sgml/ref/alter_sequence.sgml b/doc/src/sgml/ref/alter_sequence.sgml index c6c3a7e33c0..28a81022aab 100644 --- a/doc/src/sgml/ref/alter_sequence.sgml +++ b/doc/src/sgml/ref/alter_sequence.sgml @@ -1,5 +1,5 @@ @@ -236,6 +236,12 @@ ALTER SEQUENCE serial RESTART WITH 105; later aborts. This means that aborted transactions may leave unused "holes" in the sequence of assigned values. setval operations are never rolled back, either. + + ALTER SEQUENCE will not immediately affect backends, other than the + current one, which have cached sequence values. They must use up all cached values + prior to noticing the changed sequence parameters. The current backend will be + immediatly affected. + diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml index 9a29b645aae..2a33de6dfb5 100644 --- a/doc/src/sgml/ref/create_table.sgml +++ b/doc/src/sgml/ref/create_table.sgml @@ -1,5 +1,5 @@ @@ -18,7 +18,8 @@ PostgreSQL documentation CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } ] TABLE table_name ( { column_name data_type [ DEFAULT default_expr ] [ column_constraint [, ... ] ] - | table_constraint } [, ... ] + | table_constraint + | LIKE parent_table [ { INCLUDING | EXCLUDING } DEFAULTS ] } [, ... ] ) [ INHERITS ( parent_table [, ... ] ) ] [ WITH OIDS | WITHOUT OIDS ] @@ -172,6 +173,26 @@ and table_constraint is: + + LIKE parent_table [ { INCLUDING | EXCLUDING } DEFAULTS ] + + + The LIKE clause specifies a table from which + the new table automatically inherits all column names, their datatypes, and + NOT NULL constraints. + + + Unlike INHERITS, the new table and inherited table + are complete decoupled after creation has been completed. Data inserted + into the new table will not be reflected into the parent table. + + + Default expressions for the inherited column definitions will only be included if + INCLUDING DEFAULTS is specified. The default is to exclude + default expressions. + + + INHERITS ( parent_table [, ... ] ) -- cgit v1.2.3