Skip to content

Return values from INSERT are not parsed #51

@hengestone

Description

@hengestone

For a pgsql_connection:extended_query of the form
INSERT INTO address (v, acct_id, org_id,)
VALUES ( $1, $2, $3)
RETURNING id;

The return value is e.g.
{{insert, 0, 1}, {[{record, <<00,08....>>}]}}
I.e. the return value is not decoded from the raw binary as it is for a SELECT query.

Using pgsql_connection:simple_query instead, gives e.g.
{{insert, 0, 1}, {[{21}]}}

It would be great to be able to use the set and return pattern as it eliminates one DB round trip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions