Thread

Commits

  1. doc: Fix description of pg_replication_origin_oid() in error case

  1. docs: pg_replication_origin_oid() description does not match behaviour

    Ian Lawrence Barwick <barwick@gmail.com> — 2022-01-18T01:19:41Z

    Hi
    
    From the documentation for pg_replication_origin_oid() [1]:
    
    > Looks up a replication origin by name and returns the internal ID.
    > If no such replication origin is found an error is thrown.
    
    However, it actually returns NULL if the origin does not exist:
    
        postgres=# SELECT * FROM pg_replication_origin;
        roident | roname
        ---------+--------
        (0 rows)
    
        postgres=# SELECT pg_replication_origin_oid('foo'),
    pg_replication_origin_oid('foo') IS NULL;
         pg_replication_origin_oid | ?column?
        ---------------------------+----------
                                   | t
        (1 row)
    
    Given that the code has remained unchanged since the function was
    introduced in 9.5, it seems reasonable to change the documentation
    to match the function behaviour rather than the other way round.
    
    
    Regards
    
    Ian Barwick
    
    [1] https://www.postgresql.org/docs/current/functions-admin.html#FUNCTIONS-REPLICATION-TABLE
    
    -- 
    EnterpriseDB: https://www.enterprisedb.com
    
  2. Re: docs: pg_replication_origin_oid() description does not match behaviour

    Michael Paquier <michael@paquier.xyz> — 2022-01-18T01:23:57Z

    On Tue, Jan 18, 2022 at 10:19:41AM +0900, Ian Lawrence Barwick wrote:
    > Given that the code has remained unchanged since the function was
    > introduced in 9.5, it seems reasonable to change the documentation
    > to match the function behaviour rather than the other way round.
    
    Obviously.  I'll go fix that as you suggest, if there are no
    objections.
    --
    Michael
    
  3. Re: docs: pg_replication_origin_oid() description does not match behaviour

    Nathan Bossart <bossartn@amazon.com> — 2022-01-18T18:20:22Z

    On 1/17/22, 5:24 PM, "Michael Paquier" <michael@paquier.xyz> wrote:
    > On Tue, Jan 18, 2022 at 10:19:41AM +0900, Ian Lawrence Barwick wrote:
    >> Given that the code has remained unchanged since the function was
    >> introduced in 9.5, it seems reasonable to change the documentation
    >> to match the function behaviour rather than the other way round.
    >
    > Obviously.  I'll go fix that as you suggest, if there are no
    > objections.
    
    +1
    
    Nathan
    
    
  4. Re: docs: pg_replication_origin_oid() description does not match behaviour

    Michael Paquier <michael@paquier.xyz> — 2022-01-19T01:40:47Z

    On Tue, Jan 18, 2022 at 06:20:22PM +0000, Bossart, Nathan wrote:
    > +1
    
    And done.
    --
    Michael
    
  5. Re: docs: pg_replication_origin_oid() description does not match behaviour

    Ian Lawrence Barwick <barwick@gmail.com> — 2022-01-19T03:25:45Z

    2022年1月19日(水) 10:40 Michael Paquier <michael@paquier.xyz>:
    >
    > On Tue, Jan 18, 2022 at 06:20:22PM +0000, Bossart, Nathan wrote:
    > > +1
    >
    > And done.
    
    Thanks!
    
    Ian Barwick
    
    -- 
    EnterpriseDB: https://www.enterprisedb.com