mirror of
https://github.com/postgres/postgres.git
synced 2025-05-02 11:44:50 +03:00
In the examples, I missed changing a few 'column' and 'table' mentions
to domain when copying alter table docs. -- Rod Taylor <rbt@rbt.ca>
This commit is contained in:
parent
e87e82d2b7
commit
3af3f79e69
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_domain.sgml,v 1.5 2002/12/06 05:07:16 momjian Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_domain.sgml,v 1.6 2002/12/06 16:40:13 momjian Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -192,25 +192,25 @@ ALTER DOMAIN <replaceable class="PARAMETER">domain</replaceable>
|
|||||||
Usage
|
Usage
|
||||||
</title>
|
</title>
|
||||||
<para>
|
<para>
|
||||||
To add a NOT NULL constraint to a column:
|
To add a NOT NULL constraint to a domain:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
ALTER DOMAIN zipcode SET NOT NULL;
|
ALTER DOMAIN zipcode SET NOT NULL;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
To remove a NOT NULL constraint from a column:
|
To remove a NOT NULL constraint from a domain:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
ALTER DOMAIN zipcode DROP NOT NULL;
|
ALTER DOMAIN zipcode DROP NOT NULL;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To add a check constraint to a table:
|
To add a check constraint to a domain:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
ALTER DOMAIN zipcode ADD CONSTRAINT zipchk CHECK (char_length(VALUE) = 5);
|
ALTER DOMAIN zipcode ADD CONSTRAINT zipchk CHECK (char_length(VALUE) = 5);
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To remove a check constraint from a table and all its children:
|
To remove a check constraint from a domain:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
ALTER DOMAIN zipcode DROP CONSTRAINT zipchk;
|
ALTER DOMAIN zipcode DROP CONSTRAINT zipchk;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user