Re: Case Sensitive "WHERE" Clauses?

From: Ian Barwick <barwick(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Case Sensitive "WHERE" Clauses?
Date: 2002-09-27 07:25:36
Message-ID: 200209270925.36160.barwick@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Friday 27 September 2002 05:19, Tom Lane wrote:
> Ian Barwick <barwick(at)gmx(dot)net> writes:
> > Anyone know what the ANSI standard is? I don`t recall any other
> > database apart from MySQL which default to case-insensitive
> > CHAR or VARCHAR columns.
>
> I believe the spec has a notion of a "collation attribute" attached
> to character-type columns. You could define a collation that makes
> comparisons case insensitive and then mark selected columns that way.
> We don't have anything like that yet, though Tatsuo has been heard
> muttering about how to make it happen ...

For reference, MySQL treats CHAR and VARCHAR columns as
case insensitive by default; to be treated as case sensitive, fields
must be defined or redefined as CHAR BINARY / VARCHAR BINARY.

Personally I prefer handling case (in)sensitivity explicitly in the WHERE
clause or at application level, though if the standard allows it and it's
optional, enabling specific columns to be case insensitive in comparisions
can only be a Good Thing (TM).

Ian Barwick
barwick(at)gmx(dot)net

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2002-09-27 07:37:08 Re: Case Sensitive "WHERE" Clauses?
Previous Message Tom Lane 2002-09-27 03:19:43 Re: Case Sensitive "WHERE" Clauses?