summaryrefslogtreecommitdiff
path: root/src/backend/parser/gram.y
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2023-05-10 18:26:10 +0200
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2023-05-10 18:26:10 +0200
commitc39f2f68e95a54e430c6a7b7d1e9f98cedff5aff (patch)
tree656e37ffbfe9a3b5495c246952d871f7ff822409 /src/backend/parser/gram.y
parentd8bcce1b5e99d8f6f12cb7a94190fdc5622355af (diff)
downloadpostgresql-c39f2f68e95a54e430c6a7b7d1e9f98cedff5aff.tar.gz
Fix publication syntax error message
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 <alvherre@alvh.no-ip.org>
Diffstat (limited to 'src/backend/parser/gram.y')
-rw-r--r--src/backend/parser/gram.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index a723d9db78..d6426f3b8e 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -18832,7 +18832,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)
@@ -18874,7 +18874,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));
}