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
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general