On Thursday 04 December 2003 19:42, Google Mike wrote: > I'm on PHP 4.2.2 and RedHat 9 with PGSQL. I want to turn quoted > identifiers off with my SQL queries. What SQL statement or .CONF > setting do I need to change so that I can turn quoted identifiers off?
Short answer - you don't. Your understanding is correct, basically PG will lowercase identifiers unless you quote them, in which case you will want to use quotes when accessing them. So... CREATE TABLE AAA ... CREATE TABLE "BBB" ... CREATE TABLE "ccc" ... SELECT * FROM AAA; -- works SELECT * FROM aaa; -- works SELECT * FROM "AAA" -- fails SELECT * FROM BBB; -- fails SELECT * FROM "BBB"; -- works SELECT * FROM CCC; -- works SELECT * FROM "ccc"; -- works SELECT * FROM "CCC"; -- fails So long as you don't create your identifiers with quotes, you can refer to them as upper/lower case. Personally, I create them all lower-case anyway and use caps for SQL keywords. -- Richard Huxton Archonet Ltd ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html