Change parameters list - Mailing list pgsql-docs

From dpakalnis@gmail.com
Subject Change parameters list
Date
Msg-id 20161009045030.1408.74186@wrigleys.postgresql.org
Whole thread Raw
List pgsql-docs
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.3/static/sql-alterforeigntable.html
Description:

I was using Postgresql v. 9.3 and was trying to link foreign table in
schema1 to relation in schema2 in another database using postgres_fdw.

According to existing description:
Parameters
name - The name (possibly schema-qualified) of an existing foreign table to
alter.

According to my experience:
ALTER FOREIGN TABLE schema1.test1
OPTIONS (SET name 'schema2.test2');
Raises error: option "name" not found.

ALTER FOREIGN TABLE schema1.test1
OPTIONS (SET table_name 'schema2.test2');
Creates link to relation 'schema1.schema2.test2'.

So in order to accomplish task I had to use the following command:
ALTER FOREIGN TABLE schema1.test1 OPTION (SET schema_name 'schema2', SET
table_name 'test2');

So, probably, description of parameters should be changed as of it is
described on postgres_fdw page
(https://www.postgresql.org/docs/9.3/static/postgres-fdw.html):
schema_name - This option, which can be specified for a foreign table, gives
the schema name to use for the foreign table on the remote server. If this
option is omitted, the name of the foreign table's schema is used.
table_name - This option, which can be specified for a foreign table, gives
the table name to use for the foreign table on the remote server. If this
option is omitted, the foreign table's name is used.

Or alternatively it should be mentioned in bold font that parameters for
OPTIONS are dependant on foreign data wrapper used.

pgsql-docs by date:

Previous
From: Tom Lane
Date:
Subject: Re: SET CONSTRAINTS ALL IMMEDIATE affects SET TRANSACTION READ ONLY
Next
From: priyankasharma257@gmail.com
Date:
Subject: Regarding Explain Analyse Output.