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 614DBD1B196 for ; Mon, 5 Jul 2004 16:39:45 -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 88351-03 for ; Mon, 5 Jul 2004 19:39:45 +0000 (GMT) Received: from mail.gmx.net (imap.gmx.net [213.165.64.20]) by svr1.postgresql.org (Postfix) with SMTP id 97EADD1B1DA for ; Mon, 5 Jul 2004 16:39:42 -0300 (ADT) Received: (qmail 10667 invoked by uid 65534); 5 Jul 2004 19:39:42 -0000 Received: from dsl-082-082-234-017.arcor-ip.net (EHLO colt.pezone.net) (82.82.234.17) by mail.gmx.net (mp018) with SMTP; 05 Jul 2004 21:39:42 +0200 X-Authenticated: #495269 From: Peter Eisentraut To: Markus Bertheau , pgsql-sql@postgresql.org Subject: Re: Custom type where not all elements are comparable Date: Mon, 5 Jul 2004 21:39:40 +0200 User-Agent: KMail/1.5.1 References: <1089041496.3239.13.camel@dicaprio.akademie1.de> In-Reply-To: <1089041496.3239.13.camel@dicaprio.akademie1.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200407052139.40156.peter_e@gmx.net> 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/24 X-Sequence-Number: 18276 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.