alexandrainst / node-red-contrib-postgresql

Node-RED node for PostgreSQL, supporting parameters, split, back-pressure
https://flows.nodered.org/node/node-red-contrib-postgresql
Apache License 2.0
31 stars 13 forks source link

Transaction support #56

Closed hammeronthenet closed 7 months ago

hammeronthenet commented 7 months ago

Hi, not properly an issue but i don't understand if it's possible in some way to use transaction with automatic rollback if an error occoured.

If yes, how/where to find some example/documentation about that?

Thanks in advance.

Alkarex commented 7 months ago

Hello, You can write any SQL statement you want. Have you tried something like the following?

BEGIN;
INSERT INTO products (product_no, name, price) VALUES (1, 'Cheese', 9.99);
COMMIT;