Re: [?? Probable Spam] Re: Without schemas - Mailing list pgsql-admin

From Félix Sánchez Rodríguez
Subject Re: [?? Probable Spam] Re: Without schemas
Date
Msg-id 001001c9b301$ab4c8df0$3000a8c0@atenea
Whole thread Raw
In response to Without schemas  (Félix Sánchez Rodríguez <fesanch@ciego.cult.cu>)
List pgsql-admin
Thanks to all for your answers, I converted my tables and fields to
lowercase and now everything works perfectly.


----- Original Message -----
From: "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
To: "Félix Sánchez Rodríguez" <fesanch@ciego.cult.cu>;
<pgsql-admin@postgresql.org>
Sent: Thursday, April 02, 2009 12:51 AM
Subject: [?? Probable Spam] Re: [ADMIN] Without schemas


>>> Félix Sánchez Rodríguez <fesanch@ciego.cult.cu> wrote:
> I've figured out that it's not the same to use 'SELECT NICK FROM
> USUARIOS' vs. 'SELECT "Nick" from "Usuarios"'

In PostgreSQL the first is interpreted the same as:

SELECT "nick" from "usuarios";

Note that this is different from the ANSI & ISO standards, which
require it to be interpreted as:

SELECT "NICK" FROM "USUARIOS";

Neither of the above would find a column "Nick" or a table "Usuarios".

For maximum portability, you might want to always quote your
identifiers, regardless of whether they are all uppercase, all
lowercase, or mixed case.  An alternative, which has worked for some,
is to never quote your identifiers and always use lower case.  I've
seen software which breaks without the quotes on either
capitalization, but the lowercase is currently more popular in more
quarters, and seems to break less often.  It's certainly safe it
you're planning to target PostgreSQL and don't care about portability.

-Kevin

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



pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Vacuum Full
Next
From: Tino Schwarze
Date:
Subject: Re: Vacuum Full