Re: get a pkey/id back from/after an insert - Mailing list pgsql-novice

From Richard Broersma Jr
Subject Re: get a pkey/id back from/after an insert
Date
Msg-id 20060620021002.47854.qmail@web31801.mail.mud.yahoo.com
Whole thread Raw
In response to Re: get a pkey/id back from/after an insert  ("Corey" <corey@bitworthy.net>)
Responses Re: get a pkey/id back from/after an insert  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-novice
> Excellent - yes, this is ultimately the same thing I was hoping to achieve:
> a single operation, rather than two or more disparate actions.
>
> Thankyou for the extra info and the link, I will definitely check that out very
> soon ( right now I'm in crunch mode and just to get something working,
> even if it's less elegant ).  I'll post to the list if I successfully manage to
> get the single-statement, non-view solution working.

Well for testing purposes it should be fine to explicitly call out currentval.  But be careful if
you are going to be using multiply connections at onces.  I am not sure that currentval will give
you what you want if another connection calls nextval first before you insert a record to your
child table.

Regards,

Richard Broersma Jr.

pgsql-novice by date:

Previous
From: "Corey"
Date:
Subject: Re: get a pkey/id back from/after an insert
Next
From: Bruno Wolff III
Date:
Subject: Re: get a pkey/id back from/after an insert