lastInsertId support for PostgreSQL

PostgreSQL does not support lastInsertId retrieval without knowing the sequence name. I've added a work-around.