Skip to content

insert operations under some circumstances refused on postgreSQL (NC14) #12465

@tuxedo-rb

Description

@tuxedo-rb

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:

SELECT lastval()

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions