RE: [SQL] types and subtypes

From: "Jackson, DeJuan" <djackson(at)cpsgroup(dot)com>
To: Ingrith Andrea Correa Vargas <i-correa(at)uniandes(dot)edu(dot)co>, pgsql-sql(at)postgreSQL(dot)org
Subject: RE: [SQL] types and subtypes
Date: 1999-03-24 22:27:02
Message-ID: D05EF808F2DFD211AE4A00105AA1B5D20269A2@cpsmail.cpsgroup.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> hello all!
>
> I want to simulate objects with Postgres and I would like to
> know if it's
> possible to create a type (like address: t_address) and then to create
> another type (like customer) with an attribute of type t_address.
Yes, you can.

> And I have a second question:
> Can I make a "reference" to an object of an existing type?!
If what you mean here is a c-style typedef no not really but you can use
inheritance.
If what you mean is another name by which to refer to a table or row then
the answer depend complete upon the context. In rules tables are already
referenced as new, old, current. In pl/pgsql you can create references
until your hearts content.

> These are features provided by the SQL3 standar, I want to
> know if it's
> possible to implement it with Postgres.
PostgreSQL isn't fully SQL3 compliant, but it's getting there.

> Can somebody help to me?!
That depends upon your problem, and you must remember that we are not
psychiatrist, plastic-surgeons, or magicians but we'll do our best.

> Thank you in advance,
> //Ingrith Correa :)
You're welcome in behind,
-DEJ

Browse pgsql-sql by date

  From Date Subject
Next Message Oleg Bartunov 1999-03-25 03:13:06 Help with query
Previous Message Jackson, DeJuan 1999-03-24 21:59:52 RE: [SQL] Use of 'default TEXT now()'