Re: how to ignore case - Mailing list pgsql-admin

From Scott Marlowe
Subject Re: how to ignore case
Date
Msg-id 1116530416.31821.103.camel@state.g2switchworks.com
Whole thread Raw
In response to how to ignore case  (lorid <lorid@dri.edu>)
Responses Re: how to ignore case  (Scott Marlowe <smarlowe@g2switchworks.com>)
List 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

pgsql-admin by date:

Previous
From: "Jason Minion"
Date:
Subject: Re: Can you generate SQL by using SQL in Postgres?
Next
From: Scott Marlowe
Date:
Subject: Re: how to ignore case