RE: [SQL] types and subtypes

Поиск
Список
Период
Сортировка
Искать

RE: [SQL] types and subtypes

От:
"Jackson, DeJuan" <djackson@cpsgroup.com>
Дата:
> 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
FAQ