From: Tom Lane <tgl@sss.pgh.pa.us>
To: Markus Bertheau <twanger@bluetwanger.de>
Cc: pgsql-sql@postgresql.org
Subject: Re: Custom type where not all elements are comparable
Date: Mon, 05 Jul 2004 12:32:12 -0400
Message-ID: <1924.1089045132@sss.pgh.pa.us> (raw)
In-Reply-To: <1089041496.3239.13.camel@dicaprio.akademie1.de>
References: <1089041496.3239.13.camel@dicaprio.akademie1.de>
Markus Bertheau <twanger@bluetwanger.de> writes:
> Is it possible to define or implement a type in PostgreSQL not all
> values of which are comparable to each other?
Certainly, as long as you don't expect to be able to btree-index it,
sort it, or DISTINCT it. (In theory we could probably handle DISTINCT
using hash aggregation, as long as equality behaves sanely; but that's
not implemented now.)
Probably it'd be reasonable for the comparison operators to return
NULL for a noncomparable pair of inputs.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, twanger@bluetwanger.de
Subject: Re: Custom type where not all elements are comparable
In-Reply-To: <1924.1089045132@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox