Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UXCrE-0000IP-UQ for pgsql-bugs@arkaria.postgresql.org; Tue, 30 Apr 2013 15:52:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UXCrE-0000hd-6R for pgsql-bugs@arkaria.postgresql.org; Tue, 30 Apr 2013 15:52:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UXCrD-0000hW-Ar for pgsql-bugs@postgresql.org; Tue, 30 Apr 2013 15:52:43 +0000 Received: from gauss.credativ.com ([93.94.130.89]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UXCr5-0001zs-Ez for pgsql-bugs@postgresql.org; Tue, 30 Apr 2013 15:52:43 +0000 Received: from [172.26.14.218] (ip-37-201-36-74.unitymediagroup.de [37.201.36.74]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: avo@gauss.credativ.com) by gauss.credativ.com (Postfix) with ESMTPSA id 3CFC71B430F for ; Tue, 30 Apr 2013 17:52:34 +0200 (CEST) Message-ID: <517FE8C1.1050605@credativ.de> Date: Tue, 30 Apr 2013 17:52:33 +0200 From: Adrian Vondendriesch User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: Re: BUG #8128: pg_dump (>= 9.1) failed while dumping a scheme named "old" from PostgreSQL 8.4 References: In-Reply-To: X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) 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 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > Hi, > > while browsing on bugs.debian.org I saw the following bug: > 'pg_upgradecluster fails with "OLD used in query that is not in a > rule"' (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=688960). > > Because I don't found any reference to that report in pgsql-bugs I > report it by my self. > > Since I have tested it on my own I can confirm it is reproducible: > > 1. In a 8.4 cluster create a scheme called "old": >> CREATE SCHEME "old"; > > 2. Create a test table: >> CREATE TABLE "old".test(id int); > > 3. insert some test data: >> INSERT INTO "old".test VALUES (1),(2),(3); > > 4. dump it with pg_dumpall (9.1): > /usr/lib/postgresql/9.1/bin/pg_dumpall -s > foo > > This will produce the following error: >> pg_dump: SQL command failed pg_dump: Error message from server: >> ERROR: OLD used in query that is not > in a rule >> LINE 1: LOCK TABLE old.test IN ACCESS SHARE MODE ^ pg_dump: The >> command was: LOCK TABLE old.test IN ACCESS SHARE MODE pg_dumpall: >> pg_dump failed on database "postgres", exiting > > If pg_dumpall version 8.4 is used, the dump runs smoothly. This is > because pg_dump(all) in version 8.x uses quotes. (2013-04-30 > 16:24:49 CEST LOG: statement: LOCK TABLE "old".test IN ACCESS SHARE > MODE). The error also happened with pg_dump in 9.3. > > I think it's a bad idea to name a scheme 'old', but it's possible, > so it should be supported. I saw no clue to resolve that issue in > the pg_dump documentation. > > I'm running Debian Wheezy using the apt.postgresql.org repository. > > Regards > > - Adrian > > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRf+jBAAoJEJg+KbLX08eJV5YH/RLriFo3r9eDrbeO6UKwBhBq RMYcs0GvqoDz2QtDRFiyjwl6s12rarTP//dK70oA587XBjWX3FN3k1BkHDrkrEFQ XxP8hwtUKIYDYQgMx5OX8FrrLfmXcoQtkM7mISS3DxPb436Cv4+JVukZWDHVGmJj nVKXwlB/spTSKMVcyi5Be8Gjf6b+7ArYfP6334nSOEznWrdbs+f9lWokTCOkSRW6 DxWC1ELbXkOTXK03qLXtieVGIrs8r6tUnAu/PeIDb3L5nsNZzs6FLfxkq6FckMDI hVPnksW633eUQM/O1Jibr5o82rzvda2b/R/Soo1HjaChSGnnFH3HvodefS5cgTU= =EIwd -----END PGP SIGNATURE----- -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs