Re: Implementing DB2's "distinct" types - Mailing list pgsql-general

From Thomas Kellerer
Subject Re: Implementing DB2's "distinct" types
Date
Msg-id kl2nki$ggj$1@ger.gmane.org
Whole thread Raw
In response to Re: Implementing DB2's "distinct" types  (Atri Sharma <atri.jiit@gmail.com>)
Responses Re: Implementing DB2's "distinct" types
List pgsql-general
>> create type sno as varchar(50)
>>   with comparisons;
>>
>> create type pno as varchar(50)
>>   with comparisons;
>>
>> The following query will be rejected because sno and pno are not comparable (even though both are varchar columns):
>>
>>    select *
>>    from p
>>      join s on s.sno = p.pno;
>>
>> I wonder if a  similar behaviour can be achieved with Postgres' types as well.
>>
>> As a type definition in Postgres can also include comparison functions, I have the feeling that
>>this should be possible, but I don't have an idea on how to start to be honest.
>>
>
> Please mark this to pgsql-hackers, where you might get much better constructive feedback.
>
> It does sound nice.

I'm more interested if this can be dealt with on SQL level, rather than hacking Postgres itself
(and it's not really a "request" for a new feature - I'm just curious)

Thomas

Sent from my Thunderbird



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Memory usage after upgrade to 9.2.4
Next
From: Darren Duncan
Date:
Subject: Re: Implementing DB2's "distinct" types