Thread

Commits

  1. doc: Fix syntax in ALTER FOREIGN DATA WRAPPER example

  1. '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
    
  2. 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