Re: odbc to emulate mysql for end programs - Mailing list pgsql-general

From Andrew Sullivan
Subject Re: odbc to emulate mysql for end programs
Date
Msg-id 20150602114735.GD92228@crankycanuck.ca
Whole thread Raw
In response to Re: odbc to emulate mysql for end programs  (Thomas Kellerer <spam_eater@gmx.net>)
List pgsql-general
On Tue, Jun 02, 2015 at 01:31:55PM +0200, Thomas Kellerer wrote:
> > 2)  as program double-quotes the schema,table and column names.
>
> Don't use quoted identifiers. Neither in Postgres nor in MySQL (or any other DBMS)

I think a better rule of thumb is either always to use them (and spell
everything correctly) or never to use them.  Where you get in trouble
is the case where sometimes identifiers are quoted and sometimes not.
(I find the unquoted use more convenient, and I think it's subject to
fewer surprises like overloaded identifiers where one has an uppercase
in it; but I think that's a matter of taste, and if your system
framework quotes for you automatically then you have no choice but to
stick with that convention always and everywhere.)

This isn't really any different from any other development rule.  For
instance, in some environments there are various rules about single
and double quoting.  If you have no conventions imposed across all
your developers about when you use which, pretty soon you'll have an
unmaintainable mess.  And everyone has their favourite story of
frustration about indentation style or variable naming convention.
This case is no different.

A

--
Andrew Sullivan
ajs@crankycanuck.ca


pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Minor revision downgrade (9.2.11 -> 9.2.10)
Next
From: Andrew Sullivan
Date:
Subject: Re: advocating LTS release and feature-train release cycles