Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 37B1673FD6E for ; Sat, 9 Jun 2012 19:20:38 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SdU1J-0006aA-49 for pgsql-bugs@postgresql.org; Sat, 09 Jun 2012 22:20:37 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q59MKJcv005380; Sat, 9 Jun 2012 18:20:19 -0400 (EDT) From: Tom Lane To: phb.emaj@free.fr cc: pgsql-bugs@postgresql.org Subject: Re: BUG #6682: pg_dump and sequence values of serial columns for extension configuration tables In-reply-to: References: Comments: In-reply-to phb.emaj@free.fr message dated "Sat, 09 Jun 2012 06:57:22 -0000" Date: Sat, 09 Jun 2012 18:20:18 -0400 Message-ID: <5379.1339280418@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201206/84 X-Sequence-Number: 33311 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