Re: [HACKERS] Case Preservation disregarding case

From: Ken Johanson <pg-user(at)kensystem(dot)com>
To: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, pgsql-sql(at)postgresql(dot)org
Subject: Re: [HACKERS] Case Preservation disregarding case
Date: 2006-12-02 16:48:38
Message-ID: 4571AE66.7050304@kensystem.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

Dennis Bjorklund wrote:
> Ken Johanson skrev:
>
>> Has your experience with PG been different? If so I presume you have
>> have found a config that allows?:
>>
>> SELECT
>> pers.firstName,
>> pers.lastname,
>
> As long as you don't create the columns using quotes you can use that
> kind of names. For example
>
> CREATE TABLE foo (BAR int);
>
> INSERT INTO foo VALUES (42);
>
> SELECT BaR, bar, BAR, "bar" FROM foo;
>
> But using "Bar" wont work.
>
> /Dennis
>

That definitely makes sense. If one *wants* to enforce case, they should
create the identifier with quotes.

Although, since I'm using pgAdmin (III) to design tables in this case,
or creating the tables through JDBC (a convenient way to copy tables and
data from another datasource) (using the copy-paste gesture), I believe
those tools both *are* quoting identifiers that have camel case. And
that their behavior can't be overridden.

So though I might personally be comfortable with DDL commands to
re-define my existing quoted columns (as created by JDBC and pgAdmin),
other users may not be. And having to recreate and issue the DDL to use
un-quoted col names will be tedious in my case since I have ~20 tables
to import.

So my vote would remain for having a config-option to ignore case, even
on quoted identifiers..

Ken

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2006-12-02 16:56:35 Re: PostgreSQL win32 fragmentation issue
Previous Message Thomas H. 2006-12-02 16:46:43 Re: PostgreSQL win32 fragmentation issue

Browse pgsql-sql by date

  From Date Subject
Next Message Dennis Bjorklund 2006-12-02 17:10:42 Re: [HACKERS] Case Preservation disregarding case
Previous Message Dennis Bjorklund 2006-12-02 16:02:55 Re: [HACKERS] Case Preservation disregarding case