Re: OO and relation "impedance mismatch"

From: Troels Arvin <troels_at_arvin.dk>
Date: Mon, 04 Oct 2004 09:09:32 +0200
Message-ID: <pan.2004.10.04.07.09.31.918874_at_arvin.dk>


On Mon, 04 Oct 2004 03:00:02 +0000, Marshall Spight wrote:

>> I understand that user defined domains don't define any operators,  and all
>> domains are subsets of the original primitive dataypes,  but it's been
>> awfully useful to me in my work!

>
> This certainly does look to be useful, but it's missing some important
> features relative to objects. IIUC, you can't put two ints together
> to make a point, for example, and you can't define methods. This
> would not even qualify it as the weaker "object based".

A bit if confusion seems to have crept into this thread:

In PostgreSQL, CREATE DOMAIN may be used to create a "nichname"/macro for a column definition. As such, it isn't used to create new types.

It's certainly possible to create new types, operators and casts in several databases, including PostgreSQL:

http://www.postgresql.org/docs/7.4/static/sql-createtype.html
http://www.postgresql.org/docs/7.4/static/sql-createcast.html
http://www.postgresql.org/docs/7.4/static/sql-createoperator.html
- And for indexing new types:
http://www.postgresql.org/docs/7.4/static/xindex.html
-- 
Greetings from Troels Arvin, Copenhagen, Denmark
Received on Mon Oct 04 2004 - 09:09:32 CEST

Original text of this message