From: Philippe BEAUDOIN <phb.emaj@free.fr>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6682: pg_dump and sequence values of serial columns for extension configuration tables
Date: Tue, 5 Jan 2016 20:37:30 +0100
Message-ID: <568C1B7A.4070902@free.fr> (raw)
In-Reply-To: <5379.1339280418@sss.pgh.pa.us>
References: <E1SdFbu-0006NI-A6@wrigleys.postgresql.org>
<5379.1339280418@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Hi Tom,
Here is a final answer to this very old thread, for the record.
You were right (as usual ;-)). It's indeed possible to register a
sequence as a "configuration table" using the pg_extension_config_dump()
function.
>> When a table is registered as an extension configuration table and contains
>> a serial column, the current value of the sequence associated to this serial
>> column is not dumped by pg_dump.
> I think the way to make that happen is to also register the sequence as
> a configuration table of the extension. It's not clear to me that that
> should happen by default; it would depend a lot on how the extension
> designer intends to manage modifications of the table.
>
>> echo "--> And sequences cannot be registered as 'content to be dumped'"
>> $PGBIN/psql -ac "select
>> pg_catalog.pg_extension_config_dump('tbl1_col1_seq','');"
> This test proves nothing of the kind. Please read the error message:
> ERROR: pg_extension_config_dump() can only be called from an SQL script executed by CREATE EXTENSION
> You have to do it in the extension's script.
>
> regards, tom lane
>
>
May be a sentence about this in the documentation would be useful. I
will try to propose something.
Best regards. Philippe Beaudoin.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: phb.emaj@free.fr, tgl@sss.pgh.pa.us
Subject: Re: BUG #6682: pg_dump and sequence values of serial columns for extension configuration tables
In-Reply-To: <568C1B7A.4070902@free.fr>
References: <E1SdFbu-0006NI-A6@wrigleys.postgresql.org> <5379.1339280418@sss.pgh.pa.us> <568C1B7A.4070902@free.fr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox