From: Rod Taylor <pg@rbt.ca>
To: Gordon Ross <G.Ross@ccw.gov.uk>
Cc: pgsql-sql@postgresql.org
Subject: Re: Make a column case insensitive
Date: Sun, 08 Aug 2004 15:27:15 -0400
Message-ID: <1091993235.799.15.camel@jester> (raw)
In-Reply-To: <s113b1e8.083@groupwise.ccw.gov.uk>
References: <s113b1e8.083@groupwise.ccw.gov.uk>
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');
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: pg@rbt.ca, G.Ross@ccw.gov.uk
Subject: Re: Make a column case insensitive
In-Reply-To: <1091993235.799.15.camel@jester>
* 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