I\'m trying to insert a row into a PostgreSQL table with a serial primary key and I need to retrieve this column after it was inserted. I got something like this:
Th
Is that thread safe? What if another insert happens between your insert and select? Why not use:
INSERT INTO table (fieldnames) VALUES (values) RETURNING idcolumn?
INSERT INTO table (fieldnames) VALUES (values) RETURNING idcolumn