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

From Corey
Subject Re: get a pkey/id back from/after an insert
Date
Msg-id 200606191418.01103.corey@bitworthy.net
Whole thread Raw
In response to get a pkey/id back from/after an insert  ("Corey" <corey@bitworthy.net>)
Responses Re: get a pkey/id back from/after an insert  (Richard Broersma Jr <rabroersma@yahoo.com>)
List pgsql-novice
On Monday 19 June 2006 13:40, Corey wrote:
<snip>
> I'm using the perl dbi interface to postgres, and I'm wondering how
> people do the following:
>
> insert a row into a table, and then immediately get back the pkey/id
> of the row, so that I can then use this id to insert into another related
> table.
>

Ok, so of course, a few more minutes of searching/reading/googling,
and I found the answer to my own question:

currval()/nextval()


Sorry for the noise!

Cheers,

Corey


pgsql-novice by date:

Previous
From: "Corey"
Date:
Subject: get a pkey/id back from/after an insert
Next
From: Richard Broersma Jr
Date:
Subject: Re: get a pkey/id back from/after an insert