pg_publication repetitious code

Started by Alvaro Herreraover 6 years ago2 messageshackers
Jump to latest
#1Alvaro Herrera
alvherre@2ndquadrant.com

This very small patch removes some duplicated code in pg_publication.

--
�lvaro Herrera http://www.linkedin.com/in/alvherre

Attachments:

pub-dry.patchtext/x-diff; charset=us-asciiDownload+3-11
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alvaro Herrera (#1)
Re: pg_publication repetitious code

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