You can clone with
Couldn't see how to do this, is it possible?
When inserting into a table with an auto incrementing/SERIAL primary key
Did you try using the RETURNING clause? For example if you had a table named "table" with two columns, "id" and "value" where the id column is of type serial:
INSERT INTO "table" (value) VALUES ('foo') RETURNING id;
This does the trick, thanks a lot.