Re: Compatibility types, type aliases, and distinct types

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Compatibility types, type aliases, and distinct types
Date: 2008-08-18 18:29:49
Message-ID: 2322.1219084189@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> On Monday 18 August 2008 17:26:16 Tom Lane wrote:
> This feature by itself could be quite useful, and then we could simply
> add something like
> CREATE TYPE newtype AS oldtype WITH CASTS;
>>
>> This seems like a great way to get lost in "ambiguous function" hell ...

> I don't understand this point. No new overloaded functions are being defined.

If the type has no functions of its own, then the only way to make it
easily usable is to throw in implicit conversions *in both directions*
between it and the type it's an alias for. You're going to find that
that's a problem.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2008-08-18 18:57:32 Re: Overhauling GUCS
Previous Message David E. Wheeler 2008-08-18 18:26:04 Text Selectivity Operators in String Types