Custom type where not all elements are comparable - Mailing list pgsql-sql

From Markus Bertheau
Subject Custom type where not all elements are comparable
Date
Msg-id 1089041496.3239.13.camel@dicaprio.akademie1.de
Whole thread Raw
Responses Re: Custom type where not all elements are comparable
Re: Custom type where not all elements are comparable
List pgsql-sql
Hi,

Is it possible to define or implement a type in PostgreSQL not all
values of which are comparable to each other? In particular I'm thinking
of a duration type similar to the XML Schema duration type[1]. For
example P2D (2 days) is less than P4D (4 days), but P1M (1 month) and
P30D (30 days) are not comparable.

Thanks.

[1] http://www.w3.org/TR/xmlschema-2/#duration

-- 
Markus Bertheau <twanger@bluetwanger.de>



pgsql-sql by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Why no exprs in format string to RAISE
Next
From: Tom Lane
Date:
Subject: Re: Custom type where not all elements are comparable