Re: SQL Standards Compliance With Case

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Rich Shepard <rshepard(at)appl-ecosys(dot)com>, pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: SQL Standards Compliance With Case
Date: 2006-07-13 15:53:05
Message-ID: 1152805985.14241.65.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2006-07-12 at 22:26, Tom Lane wrote:
> Rich Shepard <rshepard(at)appl-ecosys(dot)com> writes:
> > I'm trying to assist the XRMS developers port their application to
> > postgres (8.1.x on), and it's almost there. One (perhaps the only) stumbling
> > block is case for table and column (relation and attribute) names.
> > Apparently MySQL allows for mixed case, while postgres wants only lower
> > case. One of the development team asked me to enquire when postgres would be
> > fully compliant with the SQL standard in this reqard.
>
> It's probably worth pointing out here that the MySQL behavior they seem
> to be expecting is considerably further from the spec than Postgres's
> behavior. If I'm reading between the lines correctly, they are
> expecting foo and Foo (both written without double-quotes) to be
> distinct identifiers. But these are the same identifier per spec,
> because the spec *requires* case-folding of unquoted identifiers.

It's even worse than that. MySQL uses filenames to identify tables,
like PostgreSQL did back in the days when dinosaurs roamed the plains
and the British Police force drove sexy cars (ok, not that far back, but
anyway)...

This means that when installed in unix, table Foo and table foo are
unique and pretty flowers, but when installed on Windows, they are the
same name...

My recommendation is to either stick to one case, all the time, or to
quote, all the time. I prefer to just stick to one case all the time.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2006-07-13 15:57:57 Re: cant connect to the database, even after doing start
Previous Message A.M. 2006-07-13 15:30:16 Re: Trying to connect to an Oracle instance...