mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Document that ONLY can be specified in publication commands
Author: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
This commit is contained in:
@ -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
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user