in reply to Re: Generating portable SQL primary key sequences
in thread Generating portable SQL primary key sequences

The databases I am familiar with that use sequences support getting the previous value. With PostgreSQL it is:
SELECT currval('table_key_seq')
With Oracle it is:
SELECT table_key_seq.currval FROM dual
Both of them can use sequences for the default value on the primary key. This makes the usage model the same as MySQL or SQL Server of insert the row without the key, and fetch the just-inserted value of the key.