What are the characteristics of a good user-defined data type

From: "Tim J(dot) Hart" <tim(dot)hart(at)tradecapture(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: What are the characteristics of a good user-defined data type
Date: 2006-06-07 07:12:39
Message-ID: 8BAF02484FD2964DB3ABB155C76B50E909A987@houdcx00.tc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

List,

This is a general question for my own education. Something I read
earlier today triggered some ideas in my head, and out of curiosity I'm
researching and learning.

What characteristics of data sets lend themselves to reasonable
user-defined data types? Are there characteristics of a data type that
would limit it's usefulness?

I've reviewed the PostgreSQL documentation on user defined data types.
It seems that data types that can't be ordered or compared for equality
would be bad candidates. After all, if a data type can't be indexed or
used in a where clause, what value does a custom type bring over a
binary or textual representation?

Additionally, the careful tone in the documentation regarding the
definition of the comparison and equality operators suggests that these
definitions may be an exceptionally delicate matter. Any experience or
suggestions on the matter?

Tim Hart

Browse pgsql-general by date

  From Date Subject
Next Message Pit M. 2006-06-07 08:11:20 Re: Problem in Pg 8.1.4 with CREATEDB
Previous Message John Sidney-Woollett 2006-06-07 06:59:54 Re: Backwards index scan