Change parameters list

From: dpakalnis(at)gmail(dot)com
To: pgsql-docs(at)postgresql(dot)org
Subject: Change parameters list
Date: 2016-10-09 04:50:30
Message-ID: 20161009045030.1408.74186@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Browse pgsql-docs by date

  From Date Subject
Next Message priyankasharma257 2016-10-09 10:40:22 Regarding Explain Analyse Output.
Previous Message Alexander Law 2016-10-04 15:45:04 Re: Docbook 5.x