pg_publication repetitious code

Поиск
Список
Период
Сортировка
Искать

pg_publication repetitious code

От:
Alvaro Herrera <alvherre@2ndquadrant.com>
Дата:
Вложения:
This very small patch removes some duplicated code in pg_publication.

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

Re: pg_publication repetitious code

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Alvaro Herrera  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


FAQ