Re: 'bar' shouldn't be a string in example

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: tim(dot)needham2(at)gmail(dot)com, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: 'bar' shouldn't be a string in example
Date: 2023-12-19 11:07:47
Message-ID: 8DF4199B-549C-433E-A35F-D1995933F11F@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

> On 18 Dec 2023, at 19:06, PG Doc comments form <noreply(at)postgresql(dot)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

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2023-12-20 23:35:38 Inconsistency in: 2.3. Creating a New Table
Previous Message PG Doc comments form 2023-12-18 18:06:41 'bar' shouldn't be a string in example