diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2023-04-12 19:29:21 +0200 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2023-04-12 19:29:21 +0200 |
commit | 9ce04b50e120275afbc03ca0b80839dde3da8308 (patch) | |
tree | c9b815953349fc5bf689799108a2966fec755bf7 /doc | |
parent | 8e82db97b0a474008d8212a63f34e449a8c50bcd (diff) | |
download | postgresql-9ce04b50e120275afbc03ca0b80839dde3da8308.tar.gz |
Revert "Catalog NOT NULL constraints" and fallout
This reverts commit e056c557aef4 and minor later fixes thereof.
There's a few problems in this new feature -- most notably regarding
pg_upgrade behavior, but others as well. This new feature is not in any
way critical on its own, so instead of scrambling to fix it we revert it
and try again in early 17 with these issues in mind.
Discussion: https://postgr.es/m/3801207.1681057430@sss.pgh.pa.us
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/sgml/catalogs.sgml | 1 | ||||
-rw-r--r-- | doc/src/sgml/ref/alter_table.sgml | 14 | ||||
-rw-r--r-- | doc/src/sgml/ref/create_table.sgml | 8 |
3 files changed, 10 insertions, 13 deletions
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index 23b570d883..5240840552 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -2552,7 +2552,6 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l <para> <literal>c</literal> = check constraint, <literal>f</literal> = foreign key constraint, - <literal>n</literal> = not null constraint, <literal>p</literal> = primary key constraint, <literal>u</literal> = unique constraint, <literal>t</literal> = constraint trigger, diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index 0b65731b1f..d4d93eeb7c 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -117,9 +117,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM PRIMARY KEY ( <replaceable class="parameter">column_name</replaceable> [, ... ] ) <replaceable class="parameter">index_parameters</replaceable> | EXCLUDE [ USING <replaceable class="parameter">index_method</replaceable> ] ( <replaceable class="parameter">exclude_element</replaceable> WITH <replaceable class="parameter">operator</replaceable> [, ... ] ) <replaceable class="parameter">index_parameters</replaceable> [ WHERE ( <replaceable class="parameter">predicate</replaceable> ) ] | FOREIGN KEY ( <replaceable class="parameter">column_name</replaceable> [, ... ] ) REFERENCES <replaceable class="parameter">reftable</replaceable> [ ( <replaceable class="parameter">refcolumn</replaceable> [, ... ] ) ] - [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ] [ ON DELETE <replaceable class="parameter">referential_action</replaceable> ] [ ON UPDATE <replaceable class="parameter">referential_action</replaceable> ] | - NOT NULL <replaceable class="parameter">column_name</replaceable> [ NO INHERIT ] -} + [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ] [ ON DELETE <replaceable class="parameter">referential_action</replaceable> ] [ ON UPDATE <replaceable class="parameter">referential_action</replaceable> ] } [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ] <phrase>and <replaceable class="parameter">table_constraint_using_index</replaceable> is:</phrase> @@ -1765,17 +1763,11 @@ ALTER TABLE measurement <title>Compatibility</title> <para> - The forms <literal>ADD COLUMN</literal> + The forms <literal>ADD</literal> (without <literal>USING INDEX</literal>), <literal>DROP [COLUMN]</literal>, <literal>DROP IDENTITY</literal>, <literal>RESTART</literal>, <literal>SET DEFAULT</literal>, <literal>SET DATA TYPE</literal> (without <literal>USING</literal>), <literal>SET GENERATED</literal>, and <literal>SET <replaceable>sequence_option</replaceable></literal> - conform with the SQL standard. - The form <literal>ADD <replaceable>table_constraint</replaceable></literal> - conforms with the SQL standard when the <literal>USING INDEX</literal> and - <literal>NOT VALID</literal> clauses are omitted and the constraint type is - one of <literal>UNIQUE</literal>, <literal>PRIMARY KEY</literal> - or <literal>REFERENCES</literal>. - The other forms are + conform with the SQL standard. The other forms are <productname>PostgreSQL</productname> extensions of the SQL standard. Also, the ability to specify more than one manipulation in a single <command>ALTER TABLE</command> command is an extension. diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml index 22fdd8bac2..10ef699fab 100644 --- a/doc/src/sgml/ref/create_table.sgml +++ b/doc/src/sgml/ref/create_table.sgml @@ -77,7 +77,6 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXI [ CONSTRAINT <replaceable class="parameter">constraint_name</replaceable> ] { CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ] | - NOT NULL <replaceable class="parameter">column_name</replaceable> | UNIQUE [ NULLS [ NOT ] DISTINCT ] ( <replaceable class="parameter">column_name</replaceable> [, ... ] ) <replaceable class="parameter">index_parameters</replaceable> | PRIMARY KEY ( <replaceable class="parameter">column_name</replaceable> [, ... ] ) <replaceable class="parameter">index_parameters</replaceable> | EXCLUDE [ USING <replaceable class="parameter">index_method</replaceable> ] ( <replaceable class="parameter">exclude_element</replaceable> WITH <replaceable class="parameter">operator</replaceable> [, ... ] ) <replaceable class="parameter">index_parameters</replaceable> [ WHERE ( <replaceable class="parameter">predicate</replaceable> ) ] | @@ -2315,6 +2314,13 @@ CREATE TABLE cities_partdef constraint, and index names must be unique across all relations within the same schema. </para> + + <para> + Currently, <productname>PostgreSQL</productname> does not record names + for <literal>NOT NULL</literal> constraints at all, so they are not + subject to the uniqueness restriction. This might change in a future + release. + </para> </refsect2> <refsect2> |