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

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to