pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Gustafsson <daniel@yesql.se>
To: tim.needham2@gmail.com
To: pgsql-docs@lists.postgresql.org
Subject: Re: 'bar' shouldn't be a string in example
Date: Tue, 19 Dec 2023 12:07:47 +0100
Message-ID: <8DF4199B-549C-433E-A35F-D1995933F11F@yesql.se> (raw)
In-Reply-To: <170292280173.1876505.5204623074024041738@wrigleys.postgresql.org>
References: <170292280173.1876505.5204623074024041738@wrigleys.postgresql.org>

> On 18 Dec 2023, at 19:06, PG Doc comments form <noreply@postgresql.org> wrote:

> ALTER FOREIGN DATA WRAPPER dbi OPTIONS (ADD foo '1', DROP 'bar');
> 
> I think "bar" is akin to "foo" and therefore should be similarly an option?
> (i.e. not a string value)?

Nice catch, "DROP 'bar'" is considered to be unqualified and thus ADD is
assumed, generating the below options:

postgres=# alter foreign data wrapper dummy options (add foo '1', drop 'bar');
ALTER FOREIGN DATA WRAPPER
postgres=# select fdwoptions from pg_foreign_data_wrapper where fdwname='dummy';
    fdwoptions
------------------
 {foo=1,drop=bar}
(1 row)

This has been incorrect since forever so I will backpatch this into all
supported versions.

--
Daniel Gustafsson






view thread (2+ messages)

Message-ID: <8DF4199B-549C-433E-A35F-D1995933F11F@yesql.se>
Permalink:  ../8DF4199B-549C-433E-A35F-D1995933F11F@yesql.se/
Also on:    postgresql.org/message-id/8DF4199B-549C-433E-A35F-D1995933F11F@yesql.se

 · 

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: daniel@yesql.se, tim.needham2@gmail.com, pgsql-docs@lists.postgresql.org
  Subject: Re: 'bar' shouldn't be a string in example
  In-Reply-To: <8DF4199B-549C-433E-A35F-D1995933F11F@yesql.se>

* 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