@@ -698,17 +698,21 @@ SET LOCAL search_path TO @extschema@;
698
698
699
699
<para>
700
700
To solve this problem, an extension's script file can mark a table
701
- it has created as a configuration table , which will cause
702
- <application>pg_dump</> to include the table's contents (not its
703
- definition) in dumps. To do that, call the function
701
+ or a sequence it has created as a configuration relation , which will
702
+ cause <application>pg_dump</> to include the table's or the sequence's
703
+ contents (not its definition) in dumps. To do that, call the function
704
704
<function>pg_extension_config_dump(regclass, text)</> after creating the
705
- table, for example
705
+ table or the sequence , for example
706
706
<programlisting>
707
707
CREATE TABLE my_config (key text, value text);
708
+ CREATE SEQUENCE my_config_seq;
708
709
709
710
SELECT pg_catalog.pg_extension_config_dump('my_config', '');
711
+ SELECT pg_catalog.pg_extension_config_dump('my_config_seq', '');
710
712
</programlisting>
711
- Any number of tables can be marked this way.
713
+ Any number of tables or sequences can be marked this way. Sequences
714
+ associated with <type>serial</> or <type>bigserial</> columns can
715
+ be marked as well.
712
716
</para>
713
717
714
718
<para>
@@ -729,6 +733,11 @@ SELECT pg_catalog.pg_extension_config_dump('my_config', 'WHERE NOT standard_entr
729
733
in the rows created by the extension's script.
730
734
</para>
731
735
736
+ <para>
737
+ For sequences, the second argument of <function>pg_extension_config_dump</>
738
+ has no effect.
739
+ </para>
740
+
732
741
<para>
733
742
More complicated situations, such as initially-provided rows that might
734
743
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
753
762
out but the dump will not be able to be restored directly and user
754
763
intervention will be required.
755
764
</para>
765
+
766
+ <para>
767
+ Sequences associated with <type>serial</> or <type>bigserial</> columns
768
+ need to be directly marked to dump their state. Marking their parent
769
+ relation is not enough for this purpose.
770
+ </para>
756
771
</sect2>
757
772
758
773
<sect2>
0 commit comments