Re: Custom type, operators and operator class not sorting/indexing correctly - Mailing list pgsql-general

From Tom Lane
Subject Re: Custom type, operators and operator class not sorting/indexing correctly
Date
Msg-id 24822.1232521383@sss.pgh.pa.us
Whole thread Raw
In response to Custom type, operators and operator class not sorting/indexing correctly  (Roger Leigh <rleigh@codelibre.net>)
Responses Re: Custom type, operators and operator class not sorting/indexing correctly  (Roger Leigh <rleigh@codelibre.net>)
List pgsql-general
Roger Leigh <rleigh@codelibre.net> writes:
> I've created a new domain (debversion) derived from TEXT, which
> includes its own operators (< <= = >= > and <>), and also its
> own operator class for BTREE indices.

You can't realistically attach such things to a domain; try making
a separate type, perhaps with an implicit cast to text to allow
use of text operators for other purposes.

Elein was going to look into tweaking the coercion rules so that
functions on domains had a non-negligible chance of being useful,
but we've not heard much about that project lately.

            regards, tom lane

pgsql-general by date:

Previous
From: Együd Csaba
Date:
Subject: Re: Database schema & data synchronizer software for PostgreSQL?
Next
From: Herouth Maoz
Date:
Subject: Slow update