From: Jan Wieck <JanWieck@Yahoo.com>
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 23:40:35 -0400
Message-ID: <4116F233.5040402@Yahoo.com> (raw)
In-Reply-To: <s113b1e8.083@groupwise.ccw.gov.uk>
References: <s113b1e8.083@groupwise.ccw.gov.uk>
On 8/6/2004 11:29 AM, 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 !)
>
> (I'm on 7.4.3)
With a little bit of legwork you can create an itext data type. It would
just use textin() and textout() for the data type declaration itself.
From there you'd define a bunch of comparision operators that are based
on sql functions doing case insensitive comparision, plus an operator
class and a couple of implicit casts. I don't think you'd even need a
single line of C code for that new data type.
Jan
>
> Thanks,
>
> GTG
>
> Gordon Ross,
> Network Manager/Rheolwr Rhydwaith
> Countryside Council for Wales/Cyngor Cefn Gwlad Cymru
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #
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: JanWieck@Yahoo.com, G.Ross@ccw.gov.uk
Subject: Re: Make a column case insensitive
In-Reply-To: <4116F233.5040402@Yahoo.com>
* 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