public inbox for [email protected]
help / color / mirror / Atom feedFrom: mahendrakar s <[email protected]>
To: pgsql-novice <[email protected]>
Subject: Run a transaction block through SPI_execute
Date: Thu, 23 Nov 2023 18:33:32 +0530
Message-ID: <CABkiuWqsfevi1-GzuNNeqjTMBHMN_HMUmHZOOQZBqLWcY9aU+g@mail.gmail.com> (raw)
When I try to run a transaction block (similar) to below through SPI_execute:
BEGIN; set transaction read write; ....; COMMIT
I get an error: SPI_ERROR_TRANSACTION.
I see that SPI interface does not support transaction manipulation commands.
Documentation: https://www.postgresql.org/docs/current/spi-spi-execute.html
Can you please suggest me how to achieve run the above transaction
block using SPI_ interface?
Transaction management support only SPI_commit/SPI_rollback.
I'm more interested in setting `set transaction read write;` through
SPI interface.
Thanks,
Mahendrakar.
view thread (2+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Run a transaction block through SPI_execute
In-Reply-To: <CABkiuWqsfevi1-GzuNNeqjTMBHMN_HMUmHZOOQZBqLWcY9aU+g@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox