From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Josh Berkus <josh@agliodbs.com>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Cannot dump 8.4.8 database using later versions
Date: Tue, 15 Nov 2011 12:16:30 +0200
Message-ID: <4EC23BFE.4000302@enterprisedb.com> (raw)
In-Reply-To: <4EC1B5BD.9010901@agliodbs.com>
References: <201111142313.pAENDep01085@momjian.us>
<4EC1B5BD.9010901@agliodbs.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: heikki.linnakangas@enterprisedb.com, josh@agliodbs.com, bruce@momjian.us
Subject: Re: Cannot dump 8.4.8 database using later versions
In-Reply-To: <4EC23BFE.4000302@enterprisedb.com>
References: <201111142313.pAENDep01085@momjian.us> <4EC1B5BD.9010901@agliodbs.com> <4EC23BFE.4000302@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox