Lists: | pgsql-generalpgsql-sql |
---|
From: | "Carmen Wai" <wai_carmen(at)hotmail(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org |
Subject: | Case in-sensitive |
Date: | 2002-07-23 14:35:40 |
Message-ID: | F65Ok5zzfEvxhJx5seQ00000046@hotmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-sql |
Hello:
Can I config the Postgresql so that it can match case in-sensitive pattern
automatically? i.e. I don't need to explicit convert the pattern to lower
case like this: .....WHERE lower(textfield) LIKE lower(pattern)
Thanks a lot!
Carmen
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
From: | Andrew Sullivan <andrew(at)libertyrms(dot)info> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Case in-sensitive |
Date: | 2002-07-23 14:46:33 |
Message-ID: | 20020723104633.E23294@mail.libertyrms.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-sql |
On Tue, Jul 23, 2002 at 02:35:40PM +0000, Carmen Wai wrote:
> Hello:
>
> Can I config the Postgresql so that it can match case in-sensitive pattern
> automatically? i.e. I don't need to explicit convert the pattern to lower
> case like this: .....WHERE lower(textfield) LIKE lower(pattern)
No. But you can use ILIKE, which is a case-insensitive LIKE.
A
--
----
Andrew Sullivan 87 Mowat Avenue
Liberty RMS Toronto, Ontario Canada
<andrew(at)libertyrms(dot)info> M6K 3E3
+1 416 646 3304 x110
From: | "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | "Carmen Wai" <wai_carmen(at)hotmail(dot)com>, <pgsql-sql(at)postgresql(dot)org>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: [SQL] Case in-sensitive |
Date: | 2002-07-25 02:21:52 |
Message-ID: | GNELIHDDFBOCMGBFGEFOAEFFCDAA.chriskl@familyhealth.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-sql |
> Can I config the Postgresql so that it can match case
> in-sensitive pattern
> automatically? i.e. I don't need to explicit convert the pattern to lower
> case like this: .....WHERE lower(textfield) LIKE lower(pattern)
All you need to do is this:
......WHERE textfield ILIKE pattern
Chris
From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>, "Carmen Wai" <wai_carmen(at)hotmail(dot)com>, <pgsql-sql(at)postgresql(dot)org>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: [SQL] Case in-sensitive |
Date: | 2002-07-25 02:27:42 |
Message-ID: | 200207241927.42145.josh@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-sql |
Chris,
> > Can I config the Postgresql so that it can match case
> > in-sensitive pattern
> > automatically? i.e. I don't need to explicit convert the pattern to lower
> > case like this: .....WHERE lower(textfield) LIKE lower(pattern)
>
> All you need to do is this:
>
> ......WHERE textfield ILIKE pattern
Though, keep in mind, lower(textfield) can be indexed, but ILIKE textfield
cannot.
--
-Josh Berkus
Aglio Database Solutions
San Francisco