Re: case insensitive table names

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: alwin <alwin(at)cs(dot)nl>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: case insensitive table names
Date: 2004-10-12 14:50:44
Message-ID: 2292.1097592644@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

alwin <alwin(at)cs(dot)nl> writes:
> So far so good. But the current code uses queries without quotes, like
> select * from Table; and not select * from "Table";.

You have a problem :-(

> Is there an easier fix for this? Does the SQL92/SQL3/SQL2003 specify
> unquoted table names to be case-insensitive or does it say it needs to
> be converted to lowercase?

The SQL spec is absolutely clear that the above code is wrong. What the
spec actually says is that unquoted names should be forced to all upper
case (so Table is equivalent to "TABLE"). Postgres forces them to lower
case (so Table is equivalent to "table") which is not quite the same but
has the same effect that unquoted names are not case sensitive. But
under both the exact spec rules and our rules, a mixed-case quoted name
is never equivalent to any unquoted name. There is no such thing as
case insensitivity for quoted names.

regards, tom lane

In response to

Responses

  • unsuscribe at 2004-10-12 15:02:23 from David Cancino Muñiz

Browse pgsql-admin by date

  From Date Subject
Next Message David Cancino Muñiz 2004-10-12 15:02:23 unsuscribe
Previous Message alwin 2004-10-12 14:18:01 case insensitive table names