Retrieve primary key after inserting - Mailing list pgsql-jdbc

From Alex Dovlecel
Subject Retrieve primary key after inserting
Date
Msg-id E18E8Y1-00046R-00@ford.kbs.twi.tudelft.nl
Whole thread Raw
Responses Re: Retrieve primary key after inserting  ("Hale Pringle" <halepringle@yahoo.com>)
List pgsql-jdbc
Hello all,

Is there a special mechanism to retrieve the primary key from a record that I
just inserted?

For example, I have a table with the PK of SERIAL type. So when inserting I
let the psql to choose the primary key. But how can I get the primary key
that was set for the record? BEcause i have a relation based on that primary
key... !!! (I think it is a classic problem...)

Does psql have some special feature to help me overcome this problem ?

Tx
dovle

pgsql-jdbc by date:

Previous
From: Warren Little
Date:
Subject: calling isClosed appears to hang
Next
From: Bruce Momjian
Date:
Subject: Re: documentation