Hi, I noticed that ALTER FOREIGN TABLE document mentions unsupported features:
- table inheritance - oid system column - CHECK constraint - per-column FDW options http://developer.postgresql.org/pgdocs/postgres/sql-alterforeigntable.html These features have been proposed once, but were not committed. On the other hand, CREATE FOREIGN TABLE document seems fine as is, it doesn't mention any unsupported feature. Please find attached a patch for the document correction. The patch also replaces the phrase "table" with "foreign table" for wording consistency. Regards, -- Shigeru Hanada
diff --git a/doc/src/sgml/ref/alter_foreign_table.sgml b/doc/src/sgml/ref/alter_foreign_table.sgml index c2ebdac..abd335b 100644 *** a/doc/src/sgml/ref/alter_foreign_table.sgml --- b/doc/src/sgml/ref/alter_foreign_table.sgml *************** ALTER FOREIGN TABLE <replaceable class=" *** 65,71 **** <para> This form drops a column from a foreign table. You will need to say <literal>CASCADE</> if ! anything outside the table depends on the column; for example, views. If <literal>IF EXISTS</literal> is specified and the column does not exist, no error is thrown. In this case a notice --- 65,71 ---- <para> This form drops a column from a foreign table. You will need to say <literal>CASCADE</> if ! anything outside the foreign table depends on the column; for example, views. If <literal>IF EXISTS</literal> is specified and the column does not exist, no error is thrown. In this case a notice *************** ALTER FOREIGN TABLE <replaceable class=" *** 125,131 **** <term><literal>OPTIONS ( [ ADD | SET | DROP ] <replaceable class="PARAMETER">option</replaceable> ['<replaceable class="PARAMETER">value</replaceable>'] [, ... ] )</literal></term> <listitem> <para> ! Change options for the foreign table or the column of the foreign table. <literal>ADD</>, <literal>SET</>, and <literal>DROP</> specify the action to be performed. <literal>ADD</> is assumed if no operation is explicitly specified. Option names must be --- 125,131 ---- <term><literal>OPTIONS ( [ ADD | SET | DROP ] <replaceable class="PARAMETER">option</replaceable> ['<replaceable class="PARAMETER">value</replaceable>'] [, ... ] )</literal></term> <listitem> <para> ! Change options for the foreign table. <literal>ADD</>, <literal>SET</>, and <literal>DROP</> specify the action to be performed. <literal>ADD</> is assumed if no operation is explicitly specified. Option names must be *************** ALTER FOREIGN TABLE <replaceable class=" *** 147,162 **** </para> <para> ! You must own the table to use <command>ALTER FOREIGN TABLE</>. To change the schema of a foreign table, you must also have <literal>CREATE</literal> privilege on the new schema. - To add the table as a new child of a parent table, you must own the - parent table as well. To alter the owner, you must also be a direct or indirect member of the new owning role, and that role must have <literal>CREATE</literal> privilege on ! the table's schema. (These restrictions enforce that altering the owner ! doesn't do anything you couldn't do by dropping and recreating the table. ! However, a superuser can alter ownership of any table anyway.) </para> </refsect1> --- 147,161 ---- </para> <para> ! You must own the foreign table to use <command>ALTER FOREIGN TABLE</>. To change the schema of a foreign table, you must also have <literal>CREATE</literal> privilege on the new schema. To alter the owner, you must also be a direct or indirect member of the new owning role, and that role must have <literal>CREATE</literal> privilege on ! the foreign table's schema. (These restrictions enforce that altering the ! owner doesn't do anything you couldn't do by dropping and recreating the ! foreign table. ! However, a superuser can alter ownership of any foreign table anyway.) </para> </refsect1> *************** ALTER FOREIGN TABLE <replaceable class=" *** 197,203 **** <term><replaceable class="PARAMETER">new_name</replaceable></term> <listitem> <para> ! New name for the table. </para> </listitem> </varlistentry> --- 196,202 ---- <term><replaceable class="PARAMETER">new_name</replaceable></term> <listitem> <para> ! New name for the foreign table. </para> </listitem> </varlistentry> *************** ALTER FOREIGN TABLE <replaceable class=" *** 236,242 **** <term><replaceable class="PARAMETER">new_owner</replaceable></term> <listitem> <para> ! The user name of the new owner of the table. </para> </listitem> </varlistentry> --- 235,241 ---- <term><replaceable class="PARAMETER">new_owner</replaceable></term> <listitem> <para> ! The user name of the new owner of the foreign table. </para> </listitem> </varlistentry> *************** ALTER FOREIGN TABLE <replaceable class=" *** 245,251 **** <term><replaceable class="PARAMETER">new_schema</replaceable></term> <listitem> <para> ! The name of the schema to which the table will be moved. </para> </listitem> </varlistentry> --- 244,250 ---- <term><replaceable class="PARAMETER">new_schema</replaceable></term> <listitem> <para> ! The name of the schema to which the foreign table will be moved. </para> </listitem> </varlistentry> *************** ALTER FOREIGN TABLE <replaceable class=" *** 262,272 **** <para> Consistency with the foreign server is not checked when a column is added or removed with <literal>ADD COLUMN</literal> or ! <literal>DROP COLUMN</literal>, a system <literal>oid</> column is added ! or removed, a <literal>CHECK</> or <literal>NOT NULL</> constraint is added, or column type is changed with <literal>SET DATA TYPE</>. It is the ! user's responsibility to ensure that the table definition matches the ! remote side. </para> <para> --- 261,270 ---- <para> Consistency with the foreign server is not checked when a column is added or removed with <literal>ADD COLUMN</literal> or ! <literal>DROP COLUMN</literal>, a <literal>NOT NULL</> constraint is added, or column type is changed with <literal>SET DATA TYPE</>. It is the ! user's responsibility to ensure that the foreign table definition matches ! the remote side. </para> <para> *************** ALTER FOREIGN TABLE myschema.distributor *** 308,314 **** <para> <command>ALTER FOREIGN TABLE DROP COLUMN</> can be used to drop the only ! column of a foreign table, leaving a zero-column table. This is an extension of SQL, which disallows zero-column foreign tables. </para> </refsect1> --- 306,312 ---- <para> <command>ALTER FOREIGN TABLE DROP COLUMN</> can be used to drop the only ! column of a foreign table, leaving a zero-column foreign table. This is an extension of SQL, which disallows zero-column foreign tables. </para> </refsect1>
-- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs