Re: User-Defined Datatypes

From: Gunther Schadow <gunther(at)aurora(dot)regenstrief(dot)org>
To: Philip Reimer <phre(at)wi(dot)uni-muenster(dot)de>
Cc: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: User-Defined Datatypes
Date: 2002-04-15 19:21:10
Message-ID: 3CBB2826.7030101@aurora.regenstrief.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Philip Reimer wrote:

> Hello.
>
> Is it possible to create new structured datatypes in PostgreSQL like in
> this IBM UDB2 statement:

oops, now I'm confused. Was that feature taken out when Postgres

became PostgreSQL? CREATE TYPE speaks only of opaque/scalar types.
I think in PostgreSQL you could use any table as a type name and
the type of a column was then automatically converted into a
foreign key kind of thing. For the sake of portability, I would
actually always prefer that unless the RDBMS provides a feature
to cluster/inline optimize these type tables for the physical
storage. But then, a good RDBMs should have the logical model
independent from physical storage model anyway, but anbout noone
seems to care and everyone continues to bloat the SQL language
with features that should in fact be options of the RDBMS physical
storage manager to (auto-) configure.

So, I guess the answer is no for PostgreSQL. I remember that even
in old Postgres I couldn't actually insert composite data very
easily.

regards
-Gunther

--
Gunther Schadow, M.D., Ph.D. gschadow(at)regenstrief(dot)org
Medical Information Scientist Regenstrief Institute for Health Care
Adjunct Assistant Professor Indiana University School of Medicine
tel:1(317)630-7960 http://aurora.regenstrief.org

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Moritz Sinn 2002-04-15 19:21:16 Re: function for creating random id
Previous Message Nigel J. Andrews 2002-04-15 19:09:10 Re: psql and passwords