in reply to
Getting id of postgres record inserted via DBI
I know Postgres only from hearsay, but
this other SO answer
says you can have the INSERT statement RETURNING the inserted id, and
execute in DBD::Pg
shows an example.
Comment on
Re: Getting id of postgres record inserted via DBI
In Section
Seekers of Perl Wisdom