On Sun, 31 Aug 2003, mgarriss wrote: > First thought is "SELECT CURRVAL('test_id_seq');" but this assumes that > there is only one connection inserting into this table, bad assumption.
That is what you should use, and it works for concurrent sessions. It's all described in the manual: http://www.postgresql.org/docs/7.3/static/functions-sequence.html -- /Dennis ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend