Re: Without schemas

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>> Félix Sánchez Rodríguez <fesanch@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux