pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
'bar' shouldn't be a string in example
2+ messages / 2 participants
[nested] [flat]

Commits from this thread:
  2023-12-19 e52e271b23 3cf7dfa7f3 57d55e2cd8 94415b04ed 3e8379afff d5873aaec7  doc: Fix syntax in ALTER FOREIGN DATA WRAPPER example
* 'bar' shouldn't be a string in example
@ 2023-12-18 18:06  PG Doc comments form <noreply@postgresql.org>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Doc comments form @ 2023-12-18 18:06 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: tim.needham2@gmail.com

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


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: 'bar' shouldn't be a string in example
@ 2023-12-19 11:07  Daniel Gustafsson <daniel@yesql.se>
  parent: PG Doc comments form <noreply@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Daniel Gustafsson @ 2023-12-19 11:07 UTC (permalink / raw)
  To: tim.needham2@gmail.com; pgsql-docs@lists.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






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2023-12-19 11:07 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-12-18 18:06 'bar' shouldn't be a string in example PG Doc comments form <noreply@postgresql.org>
2023-12-19 11:07 ` Daniel Gustafsson <daniel@yesql.se>

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