Case (in)sensitivity

From: Roberto Mello <rmello(at)cc(dot)usu(dot)edu>
To: pgsql-sql(at)postgresql(dot)org
Subject: Case (in)sensitivity
Date: 2002-03-11 05:02:11
Message-ID: 20020311050211.GA26754@cc.usu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Can someone enlighten me as to what the standard says about case
sensitivity and how does PostgreSQL stick to it?

I always name my tables and columns, everything in lower case. While
helping somebody with migration from MySQL to PostgreSQL, I found out
that PostgreSQL is case sensitive and that psql converts everything to
lower case.

I also found out that pgaccess allows you to create a table like "tEsT"
but then you can't do 'SELECT * FROM tEsT'. It simply doesn't find the
table. I haven't tried with 'SELECT * FROM "tEsT"' yet but I think it
should work.

Same oddity happens with the JDBC driver apparently.

I thought the SQL standard dictated non-case sensitive, but it doesn't
appear to be so. If the standard dictates case-sensitivity, why does psql
convert everything to lowercase? Is there any way to configure it to
respect case sensitivity then? How about the JDBC driver?

Any information in that regard would be great.

Thanks,

-Roberto

--
+----| http://fslc.usu.edu/ USU Free Software & GNU/Linux Club |------+
Roberto Mello - Computer Science, USU - http://www.brasileiro.net/
http://www.sdl.usu.edu/ - Space Dynamics Lab, Developer
"Apple" (c) Copyright 1767, Sir Isaac Newton.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Christopher Kings-Lynne 2002-03-11 05:04:33 Re: Case (in)sensitivity
Previous Message Thomas Lockhart 2002-03-11 01:37:43 Re: Uniqueness of rule, constraint, and trigger names