Re: Domains and supporting functions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Domains and supporting functions
Date
Msg-id 7986.1140330391@sss.pgh.pa.us
Whole thread Raw
In response to Domains and supporting functions  (elein <elein@varlena.com>)
Responses Re: Domains and supporting functions
List pgsql-hackers
elein <elein@varlena.com> writes:
> I've got a domain based on a text type.
> I've overridden the equal operator with
> lower(text) = lower(text).

This won't work, you need to make a type instead.

> If this is the way domains really are, I would strongly suggest
> expanding create domain to merge with create type (under) and
> allow us to list the basic functions. 

IMHO, the exact difference between a domain and a type is you get to
choose your own definitions of the basic operations on a type.  There's
no free lunch: as soon as you start substituting operations the
complexity involved goes up by an order of magnitude.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: Updated email signature
Next
From: Oleg Bartunov
Date:
Subject: Re: Updated email signature