On 2019-08-26 20:08, Laurenz Albe wrote:
> test=> CREATE OR REPLACE PROCEDURE testproc() LANGUAGE plpgsql AS
>$$BEGIN PERFORM 42; COMMIT; PERFORM 'x'; END;$$;
> CREATE PROCEDURE
> test=> CALL testproc();
> CALL
> test=> BEGIN;
> BEGIN
> test=> CALL testproc();
> ERROR: invalid transaction
On Mon, 26 Aug 2019 at 14:14, Tom Lane wrote:
> Laurenz Albe writes:
> > Dave Cramer wrote:
> > test=> BEGIN;
> > BEGIN
> > test=> CALL testproc();
> > ERROR: invalid transaction termination
> > CONTEXT: PL/pgSQL function testproc() line 1 at COMMIT
>
> > What is the rationale for this?
>
> A
Laurenz Albe writes:
> Dave Cramer wrote:
> test=> BEGIN;
> BEGIN
> test=> CALL testproc();
> ERROR: invalid transaction termination
> CONTEXT: PL/pgSQL function testproc() line 1 at COMMIT
> What is the rationale for this?
A procedure shouldn't be able to force commit of the surrounding
trans
[CC to -hackers]
Dave Cramer wrote:
> On Mon, 26 Aug 2019 at 13:43,
Laurenz Albe
> wrote:
> > Dave Cramer wrote:
>
> > As I said, I'd entertain a connection parameter that switched the
>
> > CALL to call procedures but ideally you'd complain to the server
> >
> folks to make Procedures useful.
> >