Re: tables with small letters?

Karsten Hilbert <[email protected]> Tue, 8 Feb 2005 19:46:09 +0100
Newsgroups gmane.comp.python.db.pypgsql.user
Message-ID <[email protected]>
You should better post on a PostgreSQL-specific list such as
pgsql-general.

> I write a test python file to connect my postgresql database. My table 
> called Testtabelle. Python always bring an error... "a relation called 
> testtabelle not exists" or so.. So I try to change the tablename from 
> Testtabelle to testtabelle... uups and it works..?? Is this possible 
> that pypgsql only allows tablenames with small letters????

The SQL standard says that table names must be case
insensitive. It suggests to fold all names to UPPERCASE.
PostgreSQL acts by the standard and uses table names case
insensitive. However, it folds all names to *lower*case (I
tend to agree that is more readable). So, Testtable,
TESTtable, tesTTable are all testtable as far as PostgreSQL is
concerned.

You *can* make PostgreSQL be case sensitive with table names,
however: just use quotes ("") around the names -- always !

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click