diff options
Diffstat (limited to 'doc/src')
| -rw-r--r-- | doc/src/sgml/ref/alter_table.sgml | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index ab929728a7f..c7288413a99 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/alter_table.sgml,v 1.99 2008/05/09 23:32:03 tgl Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/alter_table.sgml,v 1.100 2008/10/21 08:38:15 petere Exp $ PostgreSQL documentation --> @@ -33,7 +33,7 @@ where <replaceable class="PARAMETER">action</replaceable> is one of: ADD [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> <replaceable class="PARAMETER">type</replaceable> [ <replaceable class="PARAMETER">column_constraint</replaceable> [ ... ] ] DROP [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> [ RESTRICT | CASCADE ] - ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> TYPE <replaceable class="PARAMETER">type</replaceable> [ USING <replaceable class="PARAMETER">expression</replaceable> ] + ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> [ SET DATA ] TYPE <replaceable class="PARAMETER">type</replaceable> [ USING <replaceable class="PARAMETER">expression</replaceable> ] ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> SET DEFAULT <replaceable class="PARAMETER">expression</replaceable> ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> DROP DEFAULT ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> { SET | DROP } NOT NULL @@ -93,7 +93,7 @@ where <replaceable class="PARAMETER">action</replaceable> is one of: </varlistentry> <varlistentry> - <term><literal>ALTER COLUMN TYPE</literal></term> + <term><literal>SET DATA TYPE</literal></term> <listitem> <para> This form changes the type of a column of a table. Indexes and @@ -760,7 +760,7 @@ ALTER TABLE distributors with time zone</type> via a <literal>USING</literal> clause: <programlisting> ALTER TABLE foo - ALTER COLUMN foo_timestamp TYPE timestamp with time zone + ALTER COLUMN foo_timestamp SET DATA TYPE timestamp with time zone USING timestamp with time zone 'epoch' + foo_timestamp * interval '1 second'; </programlisting> @@ -868,8 +868,9 @@ ALTER TABLE myschema.distributors SET SCHEMA yourschema; <title>Compatibility</title> <para> - The <literal>ADD</literal>, <literal>DROP</>, and <literal>SET DEFAULT</> - forms conform with the SQL standard. The other forms are + The forms <literal>ADD</literal>, <literal>DROP</>, <literal>SET DEFAULT</>, + and <literal>SET DATA TYPE</literal> (without <literal>USING</literal>) + 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 is an extension. |
