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
d460c7cc
Commit
d460c7cc
authored
Apr 17, 2016
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc: Document that sequences can also be extension configuration tables
From: Michael Paquier <michael.paquier@gmail.com>
parent
9603a325
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
+20
-5
doc/src/sgml/extend.sgml
doc/src/sgml/extend.sgml
+20
-5
No files found.
doc/src/sgml/extend.sgml
View file @
d460c7cc
...
...
@@ -698,17 +698,21 @@ SET LOCAL search_path TO @extschema@;
<para>
To solve this problem, an extension's script file can mark a table
it has created as a configuration table, which will cause
<application>pg_dump</> to include the table's contents (not it
s
definition) in dumps. To do that, call the function
or a sequence it has created as a configuration relation, which will
cause <application>pg_dump</> to include the table's or the sequence'
s
contents (not its
definition) in dumps. To do that, call the function
<function>pg_extension_config_dump(regclass, text)</> after creating the
table, for example
table
or the sequence
, for example
<programlisting>
CREATE TABLE my_config (key text, value text);
CREATE SEQUENCE my_config_seq;
SELECT pg_catalog.pg_extension_config_dump('my_config', '');
SELECT pg_catalog.pg_extension_config_dump('my_config_seq', '');
</programlisting>
Any number of tables can be marked this way.
Any number of tables or sequences can be marked this way. Sequences
associated with <type>serial</> or <type>bigserial</> columns can
be marked as well.
</para>
<para>
...
...
@@ -729,6 +733,11 @@ SELECT pg_catalog.pg_extension_config_dump('my_config', 'WHERE NOT standard_entr
in the rows created by the extension's script.
</para>
<para>
For sequences, the second argument of <function>pg_extension_config_dump</>
has no effect.
</para>
<para>
More complicated situations, such as initially-provided rows that might
be modified by users, can be handled by creating triggers on the
...
...
@@ -753,6 +762,12 @@ SELECT pg_catalog.pg_extension_config_dump('my_config', 'WHERE NOT standard_entr
out but the dump will not be able to be restored directly and user
intervention will be required.
</para>
<para>
Sequences associated with <type>serial</> or <type>bigserial</> columns
need to be directly marked to dump their state. Marking their parent
relation is not enough for this purpose.
</para>
</sect2>
<sect2>
...
...
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