Re: case sensitivity

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Shachar Shemesh <psql(at)shemesh(dot)biz>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: case sensitivity
Date: 2003-07-06 23:44:58
Message-ID: 20030706163602.H63952-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sun, 6 Jul 2003, Shachar Shemesh wrote:

> Tom Lane wrote:
>
> >See also the example and footnote at the end of section 1.1.1 of our
> >documentation:
> >http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=sql-syntax.html#SQL-SYNTAX-IDENTIFIERS
> >(not sure why the link to the footnote doesn't work in that version, but
> >the footnote is at the bottom of the page).
> >
> >There has been some talk of providing an alternate mode in which
> >unquoted identifiers are folded per spec, but this seems likely to
> >break enough code that no one has really wanted to do it. My guess
> >is that we will remain intentionally non compliant on this point
> >forever.
>
> Just so we are clear what's at stake here.
>
> I am trying to perform a migration to PG-SQL for some company. They
> already support access, MS-SQL and Oracle, and want to support PG-SQL as
> well. The problem is that the application is MFC, and CRowSet opens the
> table double-quoting identifiers. The application itself does not. All
> databases carry all identifiers in allcaps. As some of the ODBC code is

Do you mean that the names are always allcaps like FOO? That would
certainly show the incompatibility case, yeah.

> outside the specific application's control, I cannot tell them to "quote
> or unquote all statements". This may drop the whole project, which would
> be a real shame.
>
> Documenting this incompatibility is fine as far as it goes, but it does
> not cover the migration very well.
>
> Also something to ponder is this. When I run psql on Debian Sid, and I do:
> create table "Test" ();
> select * from table;

Do you mean Test here? I'd wonder if you had a test table already defined,
I can't reproduce on my 7.3.x box under redhat.

> The query runs fine! It seems that PG-SQL 7.3.3. on Linux (at least the
> Debian version) treats unquoted as case independant. Am I missing
> something? Why can't I set a "compatibility" flag for the DB?

As Tom said, noone's wanted to go through and find all the things that
giving an uppercase folding option would break. For example, fairly
quickly after simply making the case folding go the other way for
identifiers, initdb breaks. It'd probably require someone who had the
time and interest in changing it and fixing all the breakage and probably
some work from then on making sure that it stays working.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Dmitry Tkach 2003-07-07 18:18:55 Backwards index scan
Previous Message Shachar Shemesh 2003-07-06 20:07:44 Re: case sensitivity