Re: Issue is changing _bt_compare function and - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Issue is changing _bt_compare function and
Date
Msg-id 20051008171634.GA5648@surnet.cl
Whole thread Raw
In response to Re: Issue is changing _bt_compare function and  (sandeep satpal <sandeep@it.iitb.ac.in>)
List pgsql-hackers
sandeep satpal wrote:

> The _bt_compare function in "nbtree.c" file calls "FunctionCall2" and it 
> passes two arguments , one is the scankey which we want to search on and 
> other  key is on current b-tree node.
> 
> My problem is I want to pass three parameter and the third argument will 
> be used for taking decision during comparision that whether I want 
> case-sensitive comparision or case-insensitive.

This is certainly the wrong layer to be making these changes.  Have you
considered using the citext type?  If it doesn't suit you, you could use
it as a foundation for developing your own.

What you need to change is the function stored in the scankey.

-- 
Alvaro Herrera                  http://www.amazon.com/gp/registry/DXLWNGRJD34
Voy a acabar con todos los humanos / con los humanos yo acabaré
voy a acabar con todos / con todos los humanos acabaré (Bender)


pgsql-hackers by date:

Previous
From: Jaime Casanova
Date:
Subject: avoid pulling up subquerys that contain volatile functions?
Next
From: Tom Lane
Date:
Subject: Re: avoid pulling up subquerys that contain volatile functions?