fixed lastInsertId in case of PDO::pgsql configuration