On Wed, Jan 21, 2009 at 02:03:03AM -0500, Tom Lane wrote:
> Roger Leigh <rle...@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.

Ah, thanks for the clarification.  So I need to use CREATE TYPE
rather than CREATE DOMAIN.  Because I'm essentially just storing
a text string with different operators, can I derive a type from
TEXT (perhaps by reusing the same input, output, receive and send
functions as TEXT?)  I saw the textsend and textreceive functions,
which I assume are the appropriate functions for send and receive?
Are there any for input and output which I may reuse?


Many thanks,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to