Re: Case sensitivity - Mailing list pgsql-general

From David Garamond
Subject Re: Case sensitivity
Date
Msg-id 4028740F.7000104@zara.6.isreserved.com
Whole thread Raw
In response to Case sensitivity  ("Jason Tesser" <JTesser@nbbc.edu>)
Responses Re: Case sensitivity
Re: Case sensitivity
List pgsql-general
Jason Tesser wrote:
> I am converting data from Access into Postgres and ran into an issue
> with case sensitivity. Can I write queries in Access that will be case
> insensitive without rewriting the queries.  So I would like to know if
> this be handled in Postgres or even if someone knows in Access.  Thank
> you.

I believe no. You can index on LOWER(f) or UPPER(f) but that still
requires a query rewriting to WHERE LOWER(f) = .... You can also write
INSERT triggers to convert values to upper case, but that still requires
query rewriting if you're comparing with mixed-case values.

This has been discussed many times. See the archive for the various
threads on this.

To be safe, if you want your application to be portable, you should
always assume case-sensitivity. AFAIK, only Access, SQL Server, and
MySQL that are case-insensitive by default while others including
Postgres are case-sensitive. Any other popular DB that are
case-sensitive out there?

--
dave


pgsql-general by date:

Previous
From: "Ed L."
Date:
Subject: Re: fsync = true beneficial on ext3?
Next
From: Klint Gore
Date:
Subject: Re: Case sensitivity