Re: pg_publication repetitious code - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_publication repetitious code
Date
Msg-id 8839.1576875245@sss.pgh.pa.us
Whole thread Raw
In response to pg_publication repetitious code  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.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



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pg_publication repetitious code
Next
From: Tom Lane
Date:
Subject: Re: range_agg