summaryrefslogtreecommitdiff
path: root/src/test/regress/expected
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/test/regress/expected
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/test/regress/expected')
-rw-r--r--src/test/regress/expected/publication.out9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/regress/expected/publication.out b/src/test/regress/expected/publication.out
index 427f87ea07..69dc6cfd85 100644
--- a/src/test/regress/expected/publication.out
+++ b/src/test/regress/expected/publication.out
@@ -132,6 +132,15 @@ Tables:
Tables from schemas:
"pub_test"
+-- weird parser corner case
+CREATE PUBLICATION testpub_parsertst FOR TABLE pub_test.testpub_nopk, CURRENT_SCHEMA;
+ERROR: invalid table name
+LINE 1: ...estpub_parsertst FOR TABLE pub_test.testpub_nopk, CURRENT_SC...
+ ^
+CREATE PUBLICATION testpub_parsertst FOR TABLES IN SCHEMA foo, test.foo;
+ERROR: invalid schema name
+LINE 1: ...CATION testpub_parsertst FOR TABLES IN SCHEMA foo, test.foo;
+ ^
-- should be able to add a table of the same schema to the schema publication
ALTER PUBLICATION testpub_forschema ADD TABLE pub_test.testpub_nopk;
\dRp+ testpub_forschema