First of all, i'm inexperienced with the oddities of postgreSQL.
A user of the Dashboard App reported a problem related to postgreSQL.
nextcloud/dashboard#44
The root of the problem lies in the postgre specific lastInsertId() method.
These tries to execute:
in class:
https://github.com/nextcloud/server/blob/master/lib/private/DB/AdapterPgSql.php#L29
for each insert operation, initiated in class:
https://github.com/nextcloud/server/blob/master/lib/public/AppFramework/Db/Mapper.php#L132
But it seems, that's under some circumstances not allowed and results in a exception.
Each App relies on AppFramework and if a App needs their own database table(s), then it uses the provided database methods.