Re: Make a column case insensitive - Mailing list pgsql-sql

From Rod Taylor
Subject Re: Make a column case insensitive
Date
Msg-id 1091993235.799.15.camel@jester
Whole thread Raw
In response to Make a column case insensitive  ("Gordon Ross" <G.Ross@ccw.gov.uk>)
List pgsql-sql
On Fri, 2004-08-06 at 11:29, Gordon Ross wrote:
> Is it possible to make a column case insensitive, without having to pepper your SELECTs with lots of lower() function
calls(and forgetting to do it at times !)
 

You could make yourself a set returning function to do this job -- but
that is probably just as difficult to remember when selecting data out
of the table.

create function abc(text) returns set of tab as 'select * from tab where
col = lower($1);' language sql;

select * from abc('sEaRcH_VaLuE');




pgsql-sql by date:

Previous
From: Kenneth Gonsalves
Date:
Subject: Re: surrogate key or not?
Next
From: "Thomas Wegner"
Date:
Subject: Re: Make a column case insensitive