Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading - Mailing list pgsql-bugs

From Hartmut Goebel
Subject Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading
Date
Msg-id 4C0921F5.4020907@goebel-consult.de
Whole thread Raw
In response to Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading  (Stephen Frost <sfrost@snowman.net>)
Responses Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-bugs
Am 04.06.2010 14:57, schrieb Stephen Frost:
> * Hartmut Goebel (h.goebel@goebel-consult.de) wrote:
>> Am 04.06.2010 13:56, schrieb Stephen Frost:
>>> Quoting all column names makes the dump script much more difficult for
>>> human consumption, which is important.
>>
>> I don't agree with you here. But this may be a matter of personal taste.
>>
>> Esp. I think, functionality is much ore important than a small decrees
>> of readability. At least pg_dump should get an option
>> "--quote-column-names", so this can be switcced on if necessary.
>=20
> Something like '--quote-identifiers' might be alright, so long as it's
> defaulted to 'off'.  Of course, I don't know that it'd actually solve
> your problem at all- after all, keywords can and will change between
> major versions and even if your pg_dump quotes all identifiers, anything
> else using the database (eg: applications) would need to as well.

The application already quotes all column names :-) It's using a generic
framework which does not (and must not) rely on column names being
non-keywords.

> If you're using pg_dump to upgrade, use the pg_dump from the version
> you're upgrading *to*, and do so in a test environment first to make
> sure that the restore works correctly, that the applications and other
> DB users are happy with the new version, etc, etc, before even thinking
> about upgrading a production system.

This is correct -- in theory. In practice there are many average system
administrators which need an easy upgrade path. You may call this
unprofessional, but this is reality.

To put it on the point: Is postgres meant for average administrators or
for elite database admins? In the first case, developers should think
about how to make work easier for the average ones.

--=20
Sch=C3=B6nen Gru=C3=9F - Regards
Hartmut Goebel
Dipl.-Informatiker (univ.), CISSP, CSSLP

Goebel Consult
Spezialist f=C3=BCr IT-Sicherheit in komplexen Umgebungen
http://www.goebel-consult.de

Monatliche Kolumne: http://www.cissp-gefluester.de/
Goebel Consult mit Mitglied bei http://www.7-it.de

pgsql-bugs by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: BUG #5490: Using distinct for select list causes insert of timestamp string literal to fail
Next
From: Farid Zidan
Date:
Subject: Re: BUG #5490: Using distinct for select list causes insert of timestamp string literal to fail