Re: Cannot dump 8.4.8 database using later versions - Mailing list pgsql-bugs

From Heikki Linnakangas
Subject Re: Cannot dump 8.4.8 database using later versions
Date
Msg-id 4EC23BFE.4000302@enterprisedb.com
Whole thread Raw
In response to Re: Cannot dump 8.4.8 database using later versions  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Cannot dump 8.4.8 database using later versions  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-bugs
On 15.11.2011 02:43, Josh Berkus wrote:
>
>>> ... somehow the query to dump the sequences is getting mangled.  Any
>>> clue how?
>>
>> Seems you have a sequence called "new";  seems we don't handle that
>> well.
>
> So, tested this some more.  For some reason, 8.4's pg_dump would
> recognize NEW as a reserved word and quote it before dumping.  9.0 and
> later pg_dump does not.  Any ideas?

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.

This is a problem with any keyword that was reserved (or
col_name_keyword or type_func_name_keyword) in an earlier release, but
has since been made unreserved. Looking at the history of our keyword
lists, that has happened to four keywords:

OFF (was reserved <= 8.4)
NEW (was reserved <= 8.4)
OLD (was reserved <= 8.4)
PUBLIC (was func_name_keyword <= 7.2)

There's also CONVERT, which used to be a col_name_keyword in versions <=
8.2, but that doesn't seem to cause trouble with pg_dump.

I'm thinking that we should add a list of these used-to-be keywords
somewhere in pg_dump (like in keywords.c), and check that list in
addition to the regular keyword list in fmtId().

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

pgsql-bugs by date:

Previous
From: "David Pinheiro"
Date:
Subject: BUG #6292: java.sql.PreparedStatement.setNull() throws PSQLException
Next
From: "Teun Hoogendoorn"
Date:
Subject: BUG #6293: JDBC driver performance