pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
how to ignore case
4+ messages / 3 participants
[nested] [flat]

* how to ignore case
@ 2005-05-19 18:52  lorid <lorid@dri.edu>
  0 siblings, 2 replies; 4+ messages in thread

From: lorid @ 2005-05-19 18:52 UTC (permalink / raw)
  To: pgsql-admin

How can I do a simple select statement ignoring the case ? kinda like \i 
in reg expressions ?

thanks in advance

Lori



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: how to ignore case
@ 2005-05-19 19:20  Scott Marlowe <smarlowe@g2switchworks.com>
  parent: lorid <lorid@dri.edu>
  1 sibling, 1 reply; 4+ messages in thread

From: Scott Marlowe @ 2005-05-19 19:20 UTC (permalink / raw)
  To: lorid <lorid@dri.edu>; +Cc: pgsql-admin

On Thu, 2005-05-19 at 13:52, lorid wrote:
> How can I do a simple select statement ignoring the case ? kinda like \i 
> in reg expressions ?
> 
> thanks in advance

You can use upper/lower:

select * from table where lower(somefield) like '%abc%';

or REGEX:

select * from table where lower ~* '.*abc.*';

SEe:

http://www.postgresql.org/docs/8.0/static/functions-matching.html#FUNCTIONS-POSIX-TABLE



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: how to ignore case
@ 2005-05-19 19:30  Scott Marlowe <smarlowe@g2switchworks.com>
  parent: Scott Marlowe <smarlowe@g2switchworks.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Scott Marlowe @ 2005-05-19 19:30 UTC (permalink / raw)
  To: lorid <lorid@dri.edu>; +Cc: pgsql-admin

On Thu, 2005-05-19 at 14:20, Scott Marlowe wrote:

> or REGEX:
> 
> select * from table where lower ~* '.*abc.*';

That second one should be:

select * from table where somefield ~* '.*abc.*';

either too much or not enough coffee



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: how to ignore case
@ 2005-05-20 12:49  Joel Fradkin <jfradkin@wazagua.com>
  parent: lorid <lorid@dri.edu>
  1 sibling, 0 replies; 4+ messages in thread

From: Joel Fradkin @ 2005-05-20 12:49 UTC (permalink / raw)
  To: 'lorid' <lorid@dri.edu>; pgsql-admin

Ilike does case insensitive like I think its ~* for a case incenitive =
(might be *~)

Joel Fradkin
 
Wazagua, Inc.
2520 Trailmate Dr
Sarasota, Florida 34243
Tel.  941-753-7111 ext 305
 
jfradkin@wazagua.com
www.wazagua.com
Powered by Wazagua
Providing you with the latest Web-based technology & advanced tools.
C 2004. WAZAGUA, Inc. All rights reserved. WAZAGUA, Inc
 This email message is for the use of the intended recipient(s) and may
contain confidential and privileged information.  Any unauthorized review,
use, disclosure or distribution is prohibited.  If you are not the intended
recipient, please contact the sender by reply email and delete and destroy
all copies of the original message, including attachments.
 

 

-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] On Behalf Of lorid
Sent: Thursday, May 19, 2005 1:52 PM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] how to ignore case

How can I do a simple select statement ignoring the case ? kinda like \i 
in reg expressions ?

thanks in advance

Lori

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2005-05-20 12:49 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-05-19 18:52 how to ignore case lorid <lorid@dri.edu>
2005-05-19 19:20 ` Scott Marlowe <smarlowe@g2switchworks.com>
2005-05-19 19:30   ` Scott Marlowe <smarlowe@g2switchworks.com>
2005-05-20 12:49 ` Joel Fradkin <jfradkin@wazagua.com>

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