On Mon, Jan 01, 2007 at 18:46:26 +0100, dfx <dfx@xxxxxx> wrote: > Dear Sirs, > > my question is very simple: > when I insert a row whith a serial field, a value is automatically > generated; how can I know this value, strictly of my row, without the risk > of to read the value of another subsequent insertion? Use currval before calling nextval again (including implicitly) in the same session. (What other sessions are doing won't change the value you see.) In 8.2 you can use the RETURNING clause to get the value inserted.