| From: | Elena <elena(dot)planas(at)gmail(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Reference Type in PostgreSQL |
| Date: | 2007-03-19 10:30:40 |
| Message-ID: | 4f2112c90703190330r5f5f5117sc5aac73986d2aa3@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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 can I define it in PostgreSQL? I haven't found it in the manuals.
Thank you for help.
--
Elena
--
Elena
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alban Hertroys | 2007-03-19 11:20:55 | Re: issue with SELECT settval(..); |
| Previous Message | Alban Hertroys | 2007-03-19 10:05:44 | Re: planning issue |