Re: Distinct types

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Distinct types
Дата
Msg-id 1226079847.30638.18.camel@jdavis
обсуждение исходный текст
Ответ на Re: Distinct types  (Jeff Davis <pgsql@j-davis.com>)
Список 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@gmx.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Distinct types
Следующее
От: Teodor Sigaev
Дата:
Сообщение: Re: Bitmap index - first look