From 30310650293bf237ae8e5eb9224d30de73565e11 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Wed, 3 Jun 2026 15:02:55 +1000 Subject: [PATCH v1] fix errmsg grammar for publication membership --- src/backend/catalog/pg_publication.c | 4 ++-- src/test/regress/expected/publication.out | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backend/catalog/pg_publication.c b/src/backend/catalog/pg_publication.c index 5c457d9aca8..7881b617736 100644 --- a/src/backend/catalog/pg_publication.c +++ b/src/backend/catalog/pg_publication.c @@ -555,7 +555,7 @@ publication_add_relation(Oid pubid, PublicationRelInfo *pri, ereport(ERROR, (errcode(ERRCODE_DUPLICATE_OBJECT), - errmsg("relation \"%s\" is already member of publication \"%s\"", + errmsg("relation \"%s\" is already a member of publication \"%s\"", RelationGetRelationName(targetrel), pub->name))); } @@ -816,7 +816,7 @@ publication_add_schema(Oid pubid, Oid schemaid, bool if_not_exists) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_OBJECT), - errmsg("schema \"%s\" is already member of publication \"%s\"", + errmsg("schema \"%s\" is already a member of publication \"%s\"", get_namespace_name(schemaid), pub->name))); } diff --git a/src/test/regress/expected/publication.out b/src/test/regress/expected/publication.out index 29e54b214a0..47b987c41d6 100644 --- a/src/test/regress/expected/publication.out +++ b/src/test/regress/expected/publication.out @@ -1522,7 +1522,7 @@ CREATE PUBLICATION testpub_fortbl FOR TABLE testpub_tbl1, pub_test.testpub_nopk; RESET client_min_messages; -- fail - already added ALTER PUBLICATION testpub_fortbl ADD TABLE testpub_tbl1; -ERROR: relation "testpub_tbl1" is already member of publication "testpub_fortbl" +ERROR: relation "testpub_tbl1" is already a member of publication "testpub_fortbl" -- fail - already added CREATE PUBLICATION testpub_fortbl FOR TABLE testpub_tbl1; ERROR: publication "testpub_fortbl" already exists @@ -1859,7 +1859,7 @@ Tables from schemas: -- add a schema which is already added to the publication ALTER PUBLICATION testpub1_forschema ADD TABLES IN SCHEMA pub_test1; -ERROR: schema "pub_test1" is already member of publication "testpub1_forschema" +ERROR: schema "pub_test1" is already a member of publication "testpub1_forschema" \dRp+ testpub1_forschema Publication testpub1_forschema Owner | All tables | All sequences | Inserts | Updates | Deletes | Truncates | Generated columns | Via root | Description -- 2.47.3