diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2017-04-17 09:14:22 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2017-04-17 09:51:52 -0400 |
commit | 1fe33252a08c285de9e84615cfde0569b9a75e58 (patch) | |
tree | 1c1b759a6b72417e558eb3a0f2f2e1a74d292b16 /src | |
parent | b6dd1271281ce856ab774fc0b491a92878e3b501 (diff) | |
download | postgresql-1fe33252a08c285de9e84615cfde0569b9a75e58.tar.gz postgresql-1fe33252a08c285de9e84615cfde0569b9a75e58.zip |
Document that ONLY can be specified in publication commands
Author: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Diffstat (limited to 'src')
-rw-r--r-- | src/test/regress/expected/publication.out | 23 | ||||
-rw-r--r-- | src/test/regress/sql/publication.sql | 10 |
2 files changed, 33 insertions, 0 deletions
diff --git a/src/test/regress/expected/publication.out b/src/test/regress/expected/publication.out index 0964718a60e..5b7fb674dad 100644 --- a/src/test/regress/expected/publication.out +++ b/src/test/regress/expected/publication.out @@ -71,6 +71,29 @@ Publications: DROP TABLE testpub_tbl2; DROP PUBLICATION testpub_foralltables; +CREATE TABLE testpub_tbl3 (a int); +CREATE TABLE testpub_tbl3a (b text) INHERITS (testpub_tbl3); +CREATE PUBLICATION testpub3 FOR TABLE testpub_tbl3; +CREATE PUBLICATION testpub4 FOR TABLE ONLY testpub_tbl3; +\dRp+ testpub3 + Publication testpub3 + Inserts | Updates | Deletes +---------+---------+--------- + t | t | t +Tables: + "public.testpub_tbl3" + "public.testpub_tbl3a" + +\dRp+ testpub4 + Publication testpub4 + Inserts | Updates | Deletes +---------+---------+--------- + t | t | t +Tables: + "public.testpub_tbl3" + +DROP TABLE testpub_tbl3, testpub_tbl3a; +DROP PUBLICATION testpub3, testpub4; -- fail - view CREATE PUBLICATION testpub_fortbl FOR TABLE testpub_view; ERROR: "testpub_view" is not a table diff --git a/src/test/regress/sql/publication.sql b/src/test/regress/sql/publication.sql index 85530bec0e7..b118bc9906f 100644 --- a/src/test/regress/sql/publication.sql +++ b/src/test/regress/sql/publication.sql @@ -44,6 +44,16 @@ SELECT pubname, puballtables FROM pg_publication WHERE pubname = 'testpub_forall DROP TABLE testpub_tbl2; DROP PUBLICATION testpub_foralltables; +CREATE TABLE testpub_tbl3 (a int); +CREATE TABLE testpub_tbl3a (b text) INHERITS (testpub_tbl3); +CREATE PUBLICATION testpub3 FOR TABLE testpub_tbl3; +CREATE PUBLICATION testpub4 FOR TABLE ONLY testpub_tbl3; +\dRp+ testpub3 +\dRp+ testpub4 + +DROP TABLE testpub_tbl3, testpub_tbl3a; +DROP PUBLICATION testpub3, testpub4; + -- fail - view CREATE PUBLICATION testpub_fortbl FOR TABLE testpub_view; CREATE PUBLICATION testpub_fortbl FOR TABLE testpub_tbl1, pub_test.testpub_nopk; |