Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T2AVr-0000kx-BR for pgsql-bugs@postgresql.org; Fri, 17 Aug 2012 00:34:07 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T2AVo-0007VO-Np for pgsql-bugs@postgresql.org; Fri, 17 Aug 2012 00:34:06 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1T2AVl-0001Xl-9t; Thu, 16 Aug 2012 20:34:01 -0400 Date: Thu, 16 Aug 2012 20:34:01 -0400 From: Bruce Momjian To: Tom Lane Cc: Robert Haas , Heikki Linnakangas , Josh Berkus , pgsql-bugs@postgresql.org Subject: Re: Cannot dump 8.4.8 database using later versions Message-ID: <20120817003401.GG30286@momjian.us> References: <201111142313.pAENDep01085@momjian.us> <4EC1B5BD.9010901@agliodbs.com> <4EC23BFE.4000302@enterprisedb.com> <9673.1321412697@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9673.1321412697@sss.pgh.pa.us> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201208/135 X-Sequence-Number: 33859 I don't think we ever addressed this, but since we have had minimal complaints about it, I guess we are OK. --------------------------------------------------------------------------- On Tue, Nov 15, 2011 at 10:04:57PM -0500, Tom Lane wrote: > Robert Haas writes: > > On Tue, Nov 15, 2011 at 5:16 AM, Heikki Linnakangas > > wrote: > >> NEW used to be a reserved keyword, but it's not so in 9.0 anymore. So 9.0 > >> pg_dump thinks it doesn't need to be quoted. > > > Why isn't it correct? > > It's correct to not quote it in pg_dump's output (since we make no > promises that such output would load into a pre-9.0 server anyway). > The problem is that it needs to be quoted in commands that pg_dump > sends back to the 8.4 server. Example: > > psql (8.4.9) > You are now connected to database "db84". > db84=# create table "new"( f1 int, "new" text); > > ... pg_dump with newer pg_dump ... > > pg_dump: SQL command failed > pg_dump: Error message from server: ERROR: syntax error at or near "new" > LINE 1: COPY public.new (f1, new) TO stdout; > ^ > pg_dump: The command was: COPY public.new (f1, new) TO stdout; > > The least painful solution might be to always quote *every* identifier > in commands sent to the source server, since we don't especially care > how nice-looking those are. > > regards, tom lane -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +