Re: Domains and supporting functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: elein <elein(at)varlena(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Domains and supporting functions
Date: 2006-02-19 06:26:31
Message-ID: 7986.1140330391@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

elein <elein(at)varlena(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Bartunov 2006-02-19 06:30:02 Re: Updated email signature
Previous Message Oleg Bartunov 2006-02-19 06:25:27 Re: Updated email signature