Custom type where not all elements are comparable

From: Markus Bertheau <twanger(at)bluetwanger(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Subject: Custom type where not all elements are comparable
Date: 2004-07-05 15:31:36
Message-ID: 1089041496.3239.13.camel@dicaprio.akademie1.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)bluetwanger(dot)de>

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2004-07-05 16:32:12 Re: Custom type where not all elements are comparable
Previous Message Ben 2004-07-05 12:29:52 What is PG best practice for storing temporary data in functions?