X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 05E69D1B1BE for ; Mon, 5 Jul 2004 12:31:56 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 74335-01 for ; Mon, 5 Jul 2004 15:31:46 +0000 (GMT) Received: from web11.manitu.net (web11.manitu.net [217.11.48.111]) by svr1.postgresql.org (Postfix) with ESMTP id 64E25D1B19F for ; Mon, 5 Jul 2004 12:31:44 -0300 (ADT) Received: from [62.165.4.166] (dicaprio.akademie1.de [62.165.4.166]) (authenticated) by web11.manitu.net (8.10.2-SOL3/8.10.2) with ESMTP id i65FVfa01746 for ; Mon, 5 Jul 2004 17:31:41 +0200 Subject: Custom type where not all elements are comparable From: Markus Bertheau To: pgsql-sql@postgresql.org Content-Type: text/plain Message-Id: <1089041496.3239.13.camel@dicaprio.akademie1.de> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) Date: Mon, 05 Jul 2004 17:31:36 +0200 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/22 X-Sequence-Number: 18274 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