Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
1fe33252
Commit
1fe33252
authored
Apr 17, 2017
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document that ONLY can be specified in publication commands
Author: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
parent
b6dd1271
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
6 deletions
+48
-6
doc/src/sgml/ref/alter_publication.sgml
doc/src/sgml/ref/alter_publication.sgml
+8
-4
doc/src/sgml/ref/create_publication.sgml
doc/src/sgml/ref/create_publication.sgml
+7
-2
src/test/regress/expected/publication.out
src/test/regress/expected/publication.out
+23
-0
src/test/regress/sql/publication.sql
src/test/regress/sql/publication.sql
+10
-0
No files found.
doc/src/sgml/ref/alter_publication.sgml
View file @
1fe33252
...
@@ -31,9 +31,9 @@ ALTER PUBLICATION <replaceable class="PARAMETER">name</replaceable> WITH ( <repl
...
@@ -31,9 +31,9 @@ ALTER PUBLICATION <replaceable class="PARAMETER">name</replaceable> WITH ( <repl
ALTER PUBLICATION <replaceable class="PARAMETER">name</replaceable> OWNER TO { <replaceable>new_owner</replaceable> | CURRENT_USER | SESSION_USER }
ALTER PUBLICATION <replaceable class="PARAMETER">name</replaceable> OWNER TO { <replaceable>new_owner</replaceable> | CURRENT_USER | SESSION_USER }
ALTER PUBLICATION <replaceable class="PARAMETER">name</replaceable> RENAME TO <replaceable>new_name</replaceable>
ALTER PUBLICATION <replaceable class="PARAMETER">name</replaceable> RENAME TO <replaceable>new_name</replaceable>
ALTER PUBLICATION <replaceable class="PARAMETER">name</replaceable> ADD TABLE
<replaceable class="PARAMETER">table_name</replaceable>
[, ...]
ALTER PUBLICATION <replaceable class="PARAMETER">name</replaceable> ADD TABLE
[ ONLY ] <replaceable class="PARAMETER">table_name</replaceable> [ * ]
[, ...]
ALTER PUBLICATION <replaceable class="PARAMETER">name</replaceable> SET TABLE
<replaceable class="PARAMETER">table_name</replaceable>
[, ...]
ALTER PUBLICATION <replaceable class="PARAMETER">name</replaceable> SET TABLE
[ ONLY ] <replaceable class="PARAMETER">table_name</replaceable> [ * ]
[, ...]
ALTER PUBLICATION <replaceable class="PARAMETER">name</replaceable> DROP TABLE
<replaceable class="PARAMETER">table_name</replaceable>
[, ...]
ALTER PUBLICATION <replaceable class="PARAMETER">name</replaceable> DROP TABLE
[ ONLY ] <replaceable class="PARAMETER">table_name</replaceable> [ * ]
[, ...]
</synopsis>
</synopsis>
</refsynopsisdiv>
</refsynopsisdiv>
...
@@ -116,7 +116,11 @@ ALTER PUBLICATION <replaceable class="PARAMETER">name</replaceable> DROP TABLE <
...
@@ -116,7 +116,11 @@ ALTER PUBLICATION <replaceable class="PARAMETER">name</replaceable> DROP TABLE <
<term><replaceable class="parameter">table_name</replaceable></term>
<term><replaceable class="parameter">table_name</replaceable></term>
<listitem>
<listitem>
<para>
<para>
Name of an existing table.
Name of an existing table. If <literal>ONLY</> is specified before the
table name, only that table is affected. If <literal>ONLY</> is not
specified, the table and all its descendant tables (if any) are
affected. Optionally, <literal>*</> can be specified after the table
name to explicitly indicate that descendant tables are included.
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
...
...
doc/src/sgml/ref/create_publication.sgml
View file @
1fe33252
...
@@ -22,7 +22,7 @@ PostgreSQL documentation
...
@@ -22,7 +22,7 @@ PostgreSQL documentation
<refsynopsisdiv>
<refsynopsisdiv>
<synopsis>
<synopsis>
CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
[ FOR TABLE
<replaceable class="parameter">table_name</replaceable>
[, ...]
[ FOR TABLE
[ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ]
[, ...]
| FOR ALL TABLES ]
| FOR ALL TABLES ]
[ WITH ( <replaceable class="parameter">option</replaceable> [, ... ] ) ]
[ WITH ( <replaceable class="parameter">option</replaceable> [, ... ] ) ]
...
@@ -68,7 +68,12 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
...
@@ -68,7 +68,12 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
<term><literal>FOR TABLE</literal></term>
<term><literal>FOR TABLE</literal></term>
<listitem>
<listitem>
<para>
<para>
Specifies a list of tables to add to the publication.
Specifies a list of tables to add to the publication. If
<literal>ONLY</> is specified before the table name, only
that table is added to the publication. If <literal>ONLY</> is not
specified, the table and all its descendant tables (if any) are added.
Optionally, <literal>*</> can be specified after the table name to
explicitly indicate that descendant tables are included.
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
...
...
src/test/regress/expected/publication.out
View file @
1fe33252
...
@@ -71,6 +71,29 @@ Publications:
...
@@ -71,6 +71,29 @@ Publications:
DROP TABLE testpub_tbl2;
DROP TABLE testpub_tbl2;
DROP PUBLICATION testpub_foralltables;
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
-- fail - view
CREATE PUBLICATION testpub_fortbl FOR TABLE testpub_view;
CREATE PUBLICATION testpub_fortbl FOR TABLE testpub_view;
ERROR: "testpub_view" is not a table
ERROR: "testpub_view" is not a table
...
...
src/test/regress/sql/publication.sql
View file @
1fe33252
...
@@ -44,6 +44,16 @@ SELECT pubname, puballtables FROM pg_publication WHERE pubname = 'testpub_forall
...
@@ -44,6 +44,16 @@ SELECT pubname, puballtables FROM pg_publication WHERE pubname = 'testpub_forall
DROP
TABLE
testpub_tbl2
;
DROP
TABLE
testpub_tbl2
;
DROP
PUBLICATION
testpub_foralltables
;
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
-- fail - view
CREATE
PUBLICATION
testpub_fortbl
FOR
TABLE
testpub_view
;
CREATE
PUBLICATION
testpub_fortbl
FOR
TABLE
testpub_view
;
CREATE
PUBLICATION
testpub_fortbl
FOR
TABLE
testpub_tbl1
,
pub_test
.
testpub_nopk
;
CREATE
PUBLICATION
testpub_fortbl
FOR
TABLE
testpub_tbl1
,
pub_test
.
testpub_nopk
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment