Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UXCfk-0008E9-RT for pgsql-bugs@arkaria.postgresql.org; Tue, 30 Apr 2013 15:40:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UXCfk-0007ui-7h for pgsql-bugs@arkaria.postgresql.org; Tue, 30 Apr 2013 15:40:52 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UXCfj-0007ud-Is for pgsql-bugs@postgresql.org; Tue, 30 Apr 2013 15:40:51 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UXCfZ-0003GK-6X for pgsql-bugs@postgresql.org; Tue, 30 Apr 2013 15:40:51 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UXCfY-0002TF-Q7 for pgsql-bugs@postgresql.org; Tue, 30 Apr 2013 15:40:41 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1UXCfT-0006k7-K4 for pgsql-bugs@postgresql.org; Tue, 30 Apr 2013 15:40:35 +0000 Date: Tue, 30 Apr 2013 15:40:35 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #8128: pg_dump (>= 9.1) failed while dumping a scheme named "old" from PostgreSQL 8.4 To: pgsql-bugs@postgresql.org From: Adrian.Vondendriesch@credativ.de X-Pg-Spam-Score: -4.4 (----) 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 The following bug has been logged on the website: Bug reference: 8128 Logged by: Adrian Vondendriesch Email address: Adrian.Vondendriesch@credativ.de PostgreSQL version: 9.1.9 Operating system: Debian GNU/Linux 7.0 Description:=20=20=20=20=20=20=20=20 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=3D688960). 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). 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 --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs