"Andrew Dunstan" <andrew@dunslane.net> writes:
> Gregory Stark wrote:
>> I'm thinking it may make sense to lie about all of these in quote_identifier
>> so that someone who upgrades from 8.2 to 8.3 can then upgrade to 8.4. If we
>> add reserved words in one step then there's no way to upgrade except to rename
>> things before dumping. Any comments?
>
> I'm confused. Won't pg_dump quote the keywords it knows its postgres version
> will need quoted? We can't expect it to have knowledge of future requirements
> for quoting
Well as far as standard syntax from the spec we can. But you're right, as
Heikki pointed out offline, the approved upgrade path is to use the pg_dump
from the target version to dump the old database.
It may still be worth telling one version of Postgres about anticipated
keywords prior to a release which adds them so that people who don't follow
instructions and try a dump generated with an old pg_dump have a fighting
chance. Besides, what's a person to do if they have a dump lying around?
Restore it in an old database so they can re-dump it with the new pg_dump?
That said, this would only bite someone who is using columns named "cube" or
"rows" *and* uses the old pg_dump or tries to restore a dump they already
have without re-dumping with the new pg_dump. It may just not be worth
worrying about.
> unless someone really does invent time travel (in which case someone could
> just go to the future and bring back version 107.6 and save us all the
> trouble).
That would revolutionize the IP law field....
-- Gregory Stark EnterpriseDB http://www.enterprisedb.com