Re: Distinct types

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Subject: Re: Distinct types
Date: 2008-11-07 18:36:30
Message-ID: 21661.1226082990@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jeff Davis <pgsql(at)j-davis(dot)com> writes:
> On Sat, 2008-11-01 at 16:38 -0400, Tom Lane wrote:
>> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
>>> There is an implicit AS ASSIGNMENT cast between the base type and the distinct
>>> type in each direction.
>>
>> Hmm ... so out-of-the-box, a distinct type would have no applicable
>> functions/operators whatsoever. You couldn't even create an index on
>> it. This seems a bit too impoverished to be useful. And given the

> I didn't have any problem creating and using an index on a distinct type
> at all.

[ scratches head... ] That should have failed, if the cast is really AS
ASSIGNMENT and not implicit. If it is implicit, how distinct is the type?

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kenneth Marshall 2008-11-07 18:43:34 Re: [RRR] Tests citext casts
Previous Message Guillaume Lelarge 2008-11-07 18:34:46 Re: Patch for ALTER DATABASE WITH TABLESPACE