pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Garamond <lists@zara.6.isreserved.com>
To: Jason Tesser <JTesser@nbbc.edu>
Cc: pgsql-general@postgresql.org
Subject: Re: Case sensitivity
Date: Tue, 10 Feb 2004 13:02:55 +0700
Message-ID: <4028740F.7000104@zara.6.isreserved.com> (raw)
In-Reply-To: <04875CB4331F0240A0AD66F970978651011377D5@paul>
References: <04875CB4331F0240A0AD66F970978651011377D5@paul>

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




view thread (80+ messages)  latest in thread

Message-ID: <4028740F.7000104@zara.6.isreserved.com>
Permalink:  ../4028740F.7000104@zara.6.isreserved.com/
Also on:    postgresql.org/message-id/4028740F.7000104@zara.6.isreserved.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-general@postgresql.org
  Cc: lists@zara.6.isreserved.com, JTesser@nbbc.edu
  Subject: Re: Case sensitivity
  In-Reply-To: <4028740F.7000104@zara.6.isreserved.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox