diff options
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/catalogs.sgml | 10 | ||||
-rw-r--r-- | doc/src/sgml/ref/alter_table.sgml | 8 |
2 files changed, 18 insertions, 0 deletions
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index d948ed487c6..be4bbc736c7 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -2037,6 +2037,16 @@ </row> <row> + <entry><structfield>conisonly</structfield></entry> + <entry><type>bool</type></entry> + <entry></entry> + <entry> + This constraint is defined locally for the relation. It is a + non-inheritable constraint. + </entry> + </row> + + <row> <entry><structfield>conkey</structfield></entry> <entry><type>int2[]</type></entry> <entry><literal><link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.attnum</></entry> diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index 00a477ef885..3b111a4c2b9 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -984,6 +984,14 @@ ALTER TABLE distributors ADD CONSTRAINT zipchk CHECK (char_length(zipcode) = 5); </para> <para> + To add a check constraint only to a table and not to its children: +<programlisting> +ALTER TABLE ONLY distributors ADD CONSTRAINT zipchk CHECK (char_length(zipcode) = 5); +</programlisting> + (The check constraint will not be inherited by future children, either.) + </para> + + <para> To remove a check constraint from a table and all its children: <programlisting> ALTER TABLE distributors DROP CONSTRAINT zipchk; |