Skip to content

Timeout logic fails with errors within transactions #16

@okeuday

Description

@okeuday

I was testing using pgsql_connection:simple_query/4 with a sequence of SQL commands that create a transaction (BEGIN/(COMMIT|ROLLBACK)) and found I was able to crash the pgsql_connection pid at https://github.com/semiocast/pgsql/blob/master/src/pgsql_connection.erl#L699 due to the fun argument not handling "{error, {pgsql_error, [...proplist data...]}}" (i.e., instead it expects to always get "{set, []}"). This occurred when one of the SQL statements supplied was invalid. This should be an error that is not yet handled within pgsql_connection, since the Erlang pid should not be dying in this case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions