Re: Transaction control in a C language function - Mailing list pgsql-interfaces

From Flaris Feller
Subject Re: Transaction control in a C language function
Date
Msg-id CANNsrHtZwfrsrz7z6Y7Nhe+DmST_QmeJ=MWAZpMxt8+iCPHGAA@mail.gmail.com
Whole thread Raw
In response to Re: Transaction control in a C language function  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-interfaces
Hello Tom,
You are absolutely right, I was calling it from a function instead of a procedure.
The documentation should mention that.
Thanks for your clarification.
Regards,
Flaris.

Em seg., 6 de mar. de 2023 às 12:21, Tom Lane <tgl@sss.pgh.pa.us> escreveu:
Flaris Feller <flaris.feller@gmail.com> writes:
> I would like to implement transaction control in a function implemented in
> C language.

That will certainly not work unless you make it a procedure.
It'd be a good idea also to check that the CALL came from a
non-atomic context.

                        regards, tom lane


--

pgsql-interfaces by date:

Previous
From: Tom Lane
Date:
Subject: Re: Transaction control in a C language function
Next
From: pgchem pgchem
Date:
Subject: C trigger significantly slower than PL/pgSQL?