This is a known problem, there is no specific PostgreSQL database driver at the moment.
The database drivers are required to return the generated id in case of an auto increment primary key column, or return null otherwise. But in case of the PGSQL driver, it throws an exception is no sequence name has been passed.
As a workaround, change /var/www/fuel/core/classes/database/pdo/connection.php#307 if you are using the ORM to
// Return a list of insert id and rows created
try
{
return array(
$this->_connection->lastInsertId(),
$result->rowCount(),
);
}
catch (\PDOException $e)
{
return array(
null,
$result->rowCount(),
);
}
or if you don't use the ORM, simply to
return array(
null,
$result->rowCount(),
);
We're working on a rewrite of the database drivers to address this (and other) issues for the next release.