Re: 'bar' shouldn't be a string in example
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: tim.needham2@gmail.com,
pgsql-docs@lists.postgresql.org
Date: 2023-12-19T11:07:47Z
Lists: pgsql-docs
> 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
Commits
-
doc: Fix syntax in ALTER FOREIGN DATA WRAPPER example
- e52e271b2300 17.0 landed
- d5873aaec789 14.11 landed
- 94415b04ed0d 16.2 landed
- 57d55e2cd81a 13.14 landed
- 3e8379afffe3 15.6 landed
- 3cf7dfa7f3f6 12.18 landed