Getting Primary Key Value After Insert - Mailing list pgsql-general

From Adam
Subject Getting Primary Key Value After Insert
Date
Msg-id 003e01c6a310$2916eb90$0200a8c0@PANASONIULSWMR
Whole thread Raw
In response to Re: Long term database archival  (Richard Broersma Jr <rabroersma@yahoo.com>)
Responses Re: Getting Primary Key Value After Insert
List pgsql-general
I'm inserting data into two tables, the second table has a forigen key that
points to the primary key of the first table.

After I insert a row into the first table, I need to take the primary key
value created in "SERIAL" column and store it so I can insert it as the
forigen key value on the second table.

What is the best way to get the value of the primary key ( SERIAL data
type ) of the row I inserted?


pgsql-general by date:

Previous
From: howachen@gmail.com
Date:
Subject: Is OpenFTS dead?
Next
From: "Adam"
Date:
Subject: Re: Getting Primary Key Value After Insert