pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedNested Table in PostgreSQL or some alternative Variants
2+ messages / 2 participants
[nested] [flat]
* Nested Table in PostgreSQL or some alternative Variants
@ 2005-10-31 13:22 Thomas Zuberbuehler <sa@zubi.li>
2005-11-01 23:35 ` Re: Nested Table in PostgreSQL or some alternative Variants Jim C. Nasby <jnasby@pervasive.com>
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Zuberbuehler @ 2005-10-31 13:22 UTC (permalink / raw)
To: pgsql-sql
Hello there
I've a problem. I can't find some information about nested tables in
PostgreSQL. Is this Features possible in pgsql or not?
* When yes, how i can use and create nested tables with pgsql?
* When no, which alternative are there (for same problem definition)?
Thank you for help.
Greetings from Zurich, Switzerland.
Thomas Zuberbuehler
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Nested Table in PostgreSQL or some alternative Variants
2005-10-31 13:22 Nested Table in PostgreSQL or some alternative Variants Thomas Zuberbuehler <sa@zubi.li>
@ 2005-11-01 23:35 ` Jim C. Nasby <jnasby@pervasive.com>
0 siblings, 0 replies; 2+ messages in thread
From: Jim C. Nasby @ 2005-11-01 23:35 UTC (permalink / raw)
To: Thomas Zuberbuehler <sa@zubi.li>; +Cc: pgsql-sql
What do you mean by 'nested table'? Maybe arrays will do what you want?
Typically (and this applies to other databases as well), this is done
using two tables and refferential integrity. IE:
CREATE TABLE purchase_order(
po_id serial CONSTRAINT purchase_order__po_id PRIMARY KEY
, customer_id int CONSTRAINT purchase_order__customer_RI REFERENCES customer(id)
, more fields...
)
CREATE TABLE po_lines (
po_id int CONSTRAINT po_lines__po_id_RI REFERENCES purchase_order(po_id)
, line_number smallint NOT NULL
, ...
, CONSTRAINT po_lines__po_id_line_number PRIMARY KEY( po_id, line_number)
)
On Mon, Oct 31, 2005 at 02:22:05PM +0100, Thomas Zuberbuehler wrote:
> Hello there
>
> I've a problem. I can't find some information about nested tables in
> PostgreSQL. Is this Features possible in pgsql or not?
>
> * When yes, how i can use and create nested tables with pgsql?
> * When no, which alternative are there (for same problem definition)?
>
> Thank you for help.
> Greetings from Zurich, Switzerland.
> Thomas Zuberbuehler
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-11-01 23:35 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-10-31 13:22 Nested Table in PostgreSQL or some alternative Variants Thomas Zuberbuehler <sa@zubi.li>
2005-11-01 23:35 ` Jim C. Nasby <jnasby@pervasive.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