From: | Jeff Davis <pgsql(at)j-davis(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
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 17:44:07 |
Message-ID: | 1226079847.30638.18.camel@jdavis |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, 2008-11-07 at 09:39 -0800, Jeff Davis wrote:
> On Sat, 2008-11-01 at 16:38 -0400, Tom Lane wrote:
> > Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > > On Friday 31 October 2008 17:01:05 Kevin Grittner wrote:
> > >> (1) Can you compare a literal of the base type?
> >
> > > No, unless you create additional casts or operators.
> >
> > >> (2) Can you explicitly cast to the base type?
> >
> > > 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.
>
Oh, I see, it doesn't have an equality operator for itself. That is
obviously limiting.
Regards,
Jeff Davis
From | Date | Subject | |
---|---|---|---|
Next Message | Teodor Sigaev | 2008-11-07 18:02:23 | Re: Bitmap index - first look |
Previous Message | Jeff Davis | 2008-11-07 17:39:18 | Re: Distinct types |