inserting references - Mailing list pgsql-general

From ktt
Subject inserting references
Date
Msg-id 20020614081408.46389.qmail@web13902.mail.yahoo.com
Whole thread Raw
Responses Re: inserting references  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
I have a table, which references
values in other 3 tables.

I would like to insert values in
bananas, oranges and kivi tables
and insert their bananas_id,oranges_id,kivi_id,
country
in fruits table.

What are better methods for doing
this(exept LAST_INSERT_ID())?
Would be nice to use the most compact form.



sample tables scheme

-----------   ----------   ----------   ----------

fruits        bananas      oranges      kivi

-----------   ----------   ----------   ----------

fruits_id     bananas_id   oranges_id   kivi_id

bananas_id    date_bn      date_or      date_kv

oranges_id    ----------   ----------   ----------

kivi_id
country

-----------

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

pgsql-general by date:

Previous
From: Adrian 'Dagurashibanipal' von Bidder
Date:
Subject: Re: read this and puke
Next
From: Martijn van Oosterhout
Date:
Subject: Re: inserting references