pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: tjk@tksoft.com <tjk@tksoft.com>
To: danlyke@flutterby.com
Cc: pgsql-sql@postgresql.org
Subject: Re: Case Insensitive Queries
Date: Wed, 30 May 2001 03:40:39 -0700 (PDT)
Message-ID: <200105301040.DAA26910@smtp3.tksoft.com> (raw)
In-Reply-To: <no.id>

Can you please explain in little more detail? I am curious.

I haven't noticed any discussion about upper() being different from
lower() when it comes to such comparisons.  As far as I know, upper()
and lower() only operate on ascii characters a-z. If you are using the
default locale, neither function should have any impact on characters
in the extended ascii range.

If upper() and lower() operate on characters in 8859-1 and other character
sets when the appropriate locale is set, then a difference in the behavior
of upper() and lower() would seem like a bug.

If you can shed some light on this, I would appreciate it.

Thanks,


Troy






> 
> Mark writes:
> > Is it possible to execute a query using a where clause that allows case
> > insensitive comparison between a field and text.
> 
> select * from account where upper(username) = upper('test')
> 
> (Upper used because, as has been remarked on this list and in other places,
> folding from richer character sets is likely to get better matches this way).
> 
> And yes, you can create an index on upper(fieldname).
> 
> Dan
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
> 




view thread (19+ messages)  latest in thread

Message-ID: <200105301040.DAA26910@smtp3.tksoft.com>
Permalink:  ../200105301040.DAA26910@smtp3.tksoft.com/
Also on:    postgresql.org/message-id/200105301040.DAA26910@smtp3.tksoft.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-sql@postgresql.org
  Cc: tjk@tksoft.com, danlyke@flutterby.com
  Subject: Re: Case Insensitive Queries
  In-Reply-To: <200105301040.DAA26910@smtp3.tksoft.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