pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: dpakalnis@gmail.com
To: pgsql-docs@postgresql.org
Subject: Change parameters list
Date: Sun, 09 Oct 2016 04:50:30 +0000
Message-ID: <20161009045030.1408.74186@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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 &#39;schema2.test2&#39;);
Raises error: option &quot;name&quot; not found.

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

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

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&#39;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&#39;s name is used.

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

-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


Message-ID: <20161009045030.1408.74186@wrigleys.postgresql.org>
Permalink:  ../20161009045030.1408.74186@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20161009045030.1408.74186@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: dpakalnis@gmail.com
  Subject: Re: Change parameters list
  In-Reply-To: <20161009045030.1408.74186@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox