From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: George A.J <jinujosein@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Case Insensitive comparison
Date: Wed, 24 Sep 2003 22:19:08 -0700 (PDT)
Message-ID: <20030924221627.E70696@megazone.bigpanda.com> (raw)
In-Reply-To: <20030925033550.35699.qmail@web14915.mail.yahoo.com>
References: <20030925033550.35699.qmail@web14915.mail.yahoo.com>
On Wed, 24 Sep 2003, George A.J wrote:
> The main problems i am facing is that in sql server the text comparisons
> are case insensitive. how can i compare text case insensitive in
> postgresql without using an upper() or lower() function in both sides
> (=). Is there any option to set in postgresql?
>
> Is there any problem in overriding the = operator that compare text. ie
> droping the current operator = and creating a new = operator(text,text).
> Does the existing = operator is using internally by postgres for some
> porpose. please help
Well, you'd really want to change all the comparison operators because
otherwise I think indexes would be screwy and I don't know off hand if
this will cause problems, but I can imagine that it might, if only on
queries from clients and such on the system catalogs.
One other option is to find or make a case insensitive collating locale
for your operating system and use that when initializing the database.
I've never tried so I can't say whether that'll have its own problems.
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: sszabo@megazone.bigpanda.com, jinujosein@yahoo.com
Subject: Re: Case Insensitive comparison
In-Reply-To: <20030924221627.E70696@megazone.bigpanda.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