Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aGsOB-0000Gx-Lj for pgsql-bugs@arkaria.postgresql.org; Wed, 06 Jan 2016 18:00:51 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aGsOB-0004vU-7f for pgsql-bugs@arkaria.postgresql.org; Wed, 06 Jan 2016 18:00:51 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aGXQG-00063b-VT for pgsql-bugs@postgresql.org; Tue, 05 Jan 2016 19:37:37 +0000 Received: from smtp5-g21.free.fr ([212.27.42.5]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aGXQD-00070K-V2 for pgsql-bugs@postgresql.org; Tue, 05 Jan 2016 19:37:35 +0000 Received: from [192.168.1.3] (unknown [82.233.212.24]) by smtp5-g21.free.fr (Postfix) with ESMTP id DB77CD48149; Tue, 5 Jan 2016 20:36:35 +0100 (CET) Subject: Re: BUG #6682: pg_dump and sequence values of serial columns for extension configuration tables To: Tom Lane References: <5379.1339280418@sss.pgh.pa.us> Cc: pgsql-bugs@postgresql.org From: Philippe BEAUDOIN Message-ID: <568C1B7A.4070902@free.fr> Date: Tue, 5 Jan 2016 20:37:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <5379.1339280418@sss.pgh.pa.us> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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