Re: BUG #6682: pg_dump and sequence values of serial columns for extension configuration tables - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #6682: pg_dump and sequence values of serial columns for extension configuration tables
Date
Msg-id 5379.1339280418@sss.pgh.pa.us
Whole thread Raw
In response to BUG #6682: pg_dump and sequence values of serial columns for extension configuration tables  (phb.emaj@free.fr)
Responses Re: BUG #6682: pg_dump and sequence values of serial columns for extension configuration tables
List pgsql-bugs
phb.emaj@free.fr writes:
> 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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #6683: dropping a table with a serial column from an extension needs to explicitely drop the associated seq
Next
From: Craig Ringer
Date:
Subject: Re: BUG #6683: dropping a table with a serial column from an extension needs to explicitely drop the associated seq