pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
types and subtypes
2+ messages / 2 participants
[nested] [flat]

* types and subtypes
@ 1999-03-24 21:59  Ingrith Andrea Correa Vargas <i-correa@uniandes.edu.co>
  0 siblings, 0 replies; 2+ messages in thread

From: Ingrith Andrea Correa Vargas @ 1999-03-24 21:59 UTC (permalink / raw)
  To: 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.

And I have a second question:
Can I make a "reference" to an object of an existing type?!

These are features provided by the SQL3 standar, I want to know if it's
possible to implement it with Postgres.

Can somebody help to me?!

Thank you in advance,



//Ingrith Correa :)







^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* RE: [SQL] types and subtypes
@ 1999-03-24 22:27  Jackson, DeJuan <djackson@cpsgroup.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Jackson, DeJuan @ 1999-03-24 22:27 UTC (permalink / raw)
  To: Ingrith Andrea Correa Vargas <i-correa@uniandes.edu.co>; 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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~1999-03-24 22:27 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-03-24 21:59 types and subtypes Ingrith Andrea Correa Vargas <i-correa@uniandes.edu.co>
1999-03-24 22:27 RE: [SQL] types and subtypes Jackson, DeJuan <djackson@cpsgroup.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox