User-Defined Datatypes

From: Philip Reimer <phre(at)wi(dot)uni-muenster(dot)de>
To: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: User-Defined Datatypes
Date: 2002-04-15 17:29:31
Message-ID: 6A8F0747DB6FAA4AB507FD5C398B6063601413@wildcat.uni-muenster.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

create type person_t as (
name varchar(30),
car car_t)

create type car_t as (
model varchar(30),
plate carchar(20))

create table car of car_t
create table person of person_t

where the table person contains a reference to the car-type in table car?
In the reference manuel I only found the create-table-statement, which
automatically creates a new data-typ corresponding to the table. But is it
possible to implement the above model including the reference by making only
create-table-statements?
Thanks for a quick answer.
Philip Reimer

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Gould 2002-04-15 17:45:42 Re: Postgresql installation problem
Previous Message Andrew Gould 2002-04-15 17:25:09 Re: Export From Postresql to a DBF File Format