Skip to content

Custom savepoint names for subtransactions #179

@nvb

Description

@nvb

Of the few Postgres drivers that support subtransactions, it seems like most permit access to the subtransaction's "name". For instance, the official C++ driver takes a name in as a parameter when creating a subtractions. This name is then used as the subtransaction's savepoint name where applicable. It seems like this driver currently hardcodes the name "sp" in the three places that a name is needed.

Would you be open to providing access to this savepoint name on subtransactions through either:

  • an added parameter to the current constructor (breaking change)
  • a secondary constructor with the extra parameter (eg. transactionWithName or namedTransaction)
  • a setter method (which would require extra logic to prevent it's use on non-nested transactions)

If so, I'd be happy to send a PR with the change!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions