am Tue, dem 12.02.2008, um 23:46:41 -0800 mailte johnf folgendes:
> > http://www.postgresql.org/docs/current/static/functions-sequence.html
> >
> >
> > HTH, Andreas
>
> But how do I do automaticly???
>
> You code implies that I just string two inserts together. I was hoping to use
> rules or some other way to do it automaticly.
currval() returns the last inserted value within the current session, it
is the usual way to insert into the parent table and use currval() to
obtain the last inserted serial value for inserts into the child table.
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net