Re: pg_publication repetitious code

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_publication repetitious code
Date: 2019-12-20 20:54:05
Message-ID: 8839.1576875245@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> This very small patch removes some duplicated code in pg_publication.

Seems like the extra test on missing_oid is unnecessary:

+ oid = get_publication_oid(pubname, missing_ok);
+ if (!OidIsValid(oid) && missing_ok)
+ return NULL;

As coded, it's get_publication_oid's job to deal with that.

Otherwise +1

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-12-20 21:15:24 Re: range_agg
Previous Message Alvaro Herrera 2019-12-20 20:10:17 pg_publication repetitious code