From 8e1d68c8f8eae96334db2f6633d2a61bcfb22f9a Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Wed, 10 May 2023 18:26:10 +0200 Subject: Fix publication syntax error message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There was some odd wording in corner-case gram.y error messages "some error ... at or near", which appears to have been modeled after "syntax error" messages. However, they don't work that way, and they're just wrong. They're also uncovered by tests. Remove the trailing words, and also add tests. They were introduced with 5a2832465fd8; backpatch to 15. Author: Álvaro Herrera --- src/backend/parser/gram.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/parser') diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 0b9cd62bf0c..2ece5d71d1a 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -18447,7 +18447,7 @@ preprocess_pubobj_list(List *pubobjspec_list, core_yyscan_t yyscanner) if (!pubobj->name && !pubobj->pubtable) ereport(ERROR, errcode(ERRCODE_SYNTAX_ERROR), - errmsg("invalid table name at or near"), + errmsg("invalid table name"), parser_errposition(pubobj->location)); if (pubobj->name) @@ -18489,7 +18489,7 @@ preprocess_pubobj_list(List *pubobjspec_list, core_yyscan_t yyscanner) else ereport(ERROR, errcode(ERRCODE_SYNTAX_ERROR), - errmsg("invalid schema name at or near"), + errmsg("invalid schema name"), parser_errposition(pubobj->location)); } -- cgit v1.2.3