Thread
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
-
'bar' shouldn't be a string in example
The Post Office <noreply@postgresql.org> — 2023-12-18T18:06:41Z
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/16/sql-alterforeigndatawrapper.html Description: Hi, Re. this example: 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)? Many thanks Tim
-
Re: 'bar' shouldn't be a string in example
Daniel Gustafsson <daniel@yesql.se> — 2023-12-19T11:07:47Z
> 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