| От | Tom Lane |
|---|---|
| Тема | Re: Run a transaction block through SPI_execute |
| Дата | |
| Msg-id | 2658681.1700754465@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Run a transaction block through SPI_execute (mahendrakar s <mahendrakarforpg@gmail.com>) |
| Список | pgsql-novice |
mahendrakar s <mahendrakarforpg@gmail.com> writes:
> 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.
Yup; you can't execute begin/commit that way.
> Transaction management support only SPI_commit/SPI_rollback.
> I'm more interested in setting `set transaction read write;` through
> SPI interface.
You could look at how plpgsql handles it. I think though that as
long as you do BEGIN and COMMIT in the approved way, you can feed
the SET through SPI_execute or one of its siblings.
regards, tom lane
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера