Re: Reference Type in PostgreSQL

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: Elena <elena(dot)planas(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Reference Type in PostgreSQL
Date: 2007-03-20 14:21:41
Message-ID: b42b73150703200721n73818c13j637d33950978da17@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 3/19/07, Elena <elena(dot)planas(at)gmail(dot)com> wrote:
> Hello all, I'm new in PostgreSQL...
>
> I would want to know like PostgreSQL manages the type reference that defines
> the standard SQL:1999. I want to define the type of attribute like a
> reference at other type.
>
> For example, in Oracle8i the definition is:
>
> -- Type Department
> CREATE OR REPLACE TYPE Department_type AS OBJECT (
> code NUMBER(5),
> name VARCHAR(40)
> );
>
> -- Type Employee
> CREATE OR REPLACE TYPE Employee_type AS OBJECT (
> code NUMBER(5),
> name VARCHAR2(40),
> department REF Department_type -- Reference to Department object type
> );
>

how is this different from simply nesting the types?

merlin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dmitry Koterov 2007-03-20 14:47:55 Re: Planner tuning
Previous Message Raymond O'Donnell 2007-03-20 14:19:23 Re: passing passords to pgsql/pg_create/pg_dump programmatically