-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
In one of my apps, I have the following scenario:
- Start a transaction
- Run prepared statement A, ignoring errors
- Run prepared statement B, ignoring errors
- Run prepared statement C, ignoring errors
- End the transaction, letting PostgreSQL roll back automatically if it needs to
- Wait a few seconds, then do the whole thing again.
The problem is: if a transaction block like this fails in prep statement A the first time the loop runs, then statements B and C will not exist in PostgreSQL, but node-postgres will assume they exist.
I've written down an example of this behaviour in a gist: https://gist.github.com/IvanSanchez/229feee233e59b32d76b
I expect node-postgres to somehow not assume that a prepared statement has been prepared if a rollback happened.
Metadata
Metadata
Assignees
Labels
No labels