Using domains for case insensitivity - Mailing list pgsql-hackers

From Shachar Shemesh
Subject Using domains for case insensitivity
Date
Msg-id 40D1986C.2030709@shemesh.biz
Whole thread Raw
Responses Re: Using domains for case insensitivity  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Hi all,

A while back I asked about creating a case insensitive postgresql. Tom, 
at the time, suggested I create a case insensitive type instead.

I am now trying to go that route, and am wondering whether domains will 
provide a shortcut for me. As far as I understand the task at hand, I am 
quite capable of using all of the existing varchar functions for input, 
output, storage, conversions and so on. The only thing I need to 
override is the comparison functions (and the resulting index creation, 
of course).

According to the docs, domains are not meant for that purpose, but for 
changing constraints of a type. Is it possible to define a domain that 
will have the same defaults and constraints as the base type, but will 
have different comparison functions? Will that provide me with what I need?
            Many thanks,
                        Shachar

-- 
Shachar Shemesh
Lingnu Open Source Consulting ltd.
http://www.lingnu.com/



pgsql-hackers by date:

Previous
From: Darko Prenosil
Date:
Subject: SPI question
Next
From: Peter Eisentraut
Date:
Subject: Re: Using domains for case insensitivity