Re: case sensitivity

"H.Merijn Brand" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <[email protected]>
On Mon, 29 Jun 2009 10:08:32 -0700, David Fetter <[email protected]>
wrote:

> On Mon, Jun 29, 2009 at 09:54:04AM -0700, Jonathan Leffler wrote:
> > On Mon, Jun 29, 2009 at 9:23 AM, David Fetter <[email protected]> wrote:
> > 
> > > On Mon, Jun 29, 2009 at 04:26:30PM +0100, Tim Bunce wrote:
> > > > Oracle is one of those databases that uppercases (unquoted)
> > > > names.  That's perfectly valid behaviour - though it can be a
> > > > major pain.
> > >
> > > It's not just valid behavior.  It's mandated by the SQL standard
> > > :(
> > 
> > The standard also says that these are 3 separate tables:
> > 
> > CREATE TABLE "foo" (...); CREATE TABLE "FOO" (...); CREATE TABLE
> > "Foo" (...);
> 
> Yes, but we were discussing case-folding behavior in unquoted
> identifiers.  The standard is clear on this, an it mandates
> fold-to-upper.
> 
> It's the only place I know of where PostgreSQL intentionally violates
> the standard, that violation being that it folds to lower instead.

One more reason to love PostgreSQL :)

FWIW Unify does not fold at all
--8<---
Unify DataServer 8.2
Copyright 1986-2003, Unify Corporation
All Rights Reserved


Opening default database
Database opened
sql> create table FOO (c_foo numeric (2) not null primary key);
recognized ddl!
sql> create table bar (C_BAR numeric (2) not null primary key);
recognized ddl!
sql> columns foo;
'foo' is an invalid table, i.e. not found in data dictionary (-10414).
sql> columns FOO;
NAME                                         TYPE    LENGTH

c_foo                                        NUMERIC      2
sql> columns bar;
NAME                                         TYPE    LENGTH

C_BAR                                        NUMERIC      2
sql> columns BAR;
'BAR' is an invalid table, i.e. not found in data dictionary (-10414).
sql> drop table foo;
recognized ddl!
Unable to find table 'foo' (-10680).
Name does not exist. (-1604).
sql> drop table FOO;
recognized ddl!
sql> drop table bar;
recognized ddl!
sql>
-->8---

I kinda like that. You get what you created.
But Unify breaks SQL standard on many ways.

-- 
H.Merijn Brand  http://tux.nl      Perl Monger  http://amsterdam.pm.org/
using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00,
11.11, 11.23, and 11.31, OpenSuSE 10.3, 11.0, and 11.1, AIX 5.2 and 5.3.
http://mirrors.develooper.com/hpux/           http://www.test-smoke.org/
http://qa.perl.org      http://www.goldmark.org/jeff/stupid-disclaimers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.