Re: Custom type where not all elements are comparable

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Markus Bertheau <twanger(at)bluetwanger(dot)de>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Custom type where not all elements are comparable
Date: 2004-07-05 19:39:40
Message-ID: 200407052139.40156.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Markus Bertheau wrote:
> 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.

Smells like the interval type.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message SZŰCS Gábor 2004-07-06 08:58:47 Immutable function in index
Previous Message Tom Lane 2004-07-05 16:32:12 Re: Custom type where not all elements are comparable