porsager / postgres

Postgres.js - The Fastest full featured PostgreSQL client for Node.js, Deno, Bun and CloudFlare

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nested transactions

devirtua opened this issue · comments

Hi,
Can nested transactions be used in this library? I could not find any information about this.
I have different transactions, and sometimes I need to use multiple transactions together to build a new transaction.

You are probably looking for savepoints. There is no such thing as nested transactions in PostgreSQL.

https://github.com/porsager/postgres?tab=readme-ov-file#savepoint-await-sqlsavepointname-fn---fn