Re: Procedure support improvements - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: Procedure support improvements
Date
Msg-id 9461.1566843290@sss.pgh.pa.us
Whole thread Raw
In response to Re: Procedure support improvements  (Laurenz Albe <laurenz.albe@cybertec.at>)
Responses Re: Procedure support improvements  (Dave Cramer <pg@fastcrypt.com>)
Re: Procedure support improvements  (Dave Cramer <pg@fastcrypt.com>)
List pgsql-jdbc
Laurenz Albe <laurenz.albe@cybertec.at> 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
transaction.

As Dave noted, what would be nicer is for procedures to be able
to start and commit autonomous transactions, without affecting
the state of the outer transaction.  We haven't got that though,
and it looks like a lot of work to get there.

            regards, tom lane



pgsql-jdbc by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Procedure support improvements
Next
From: Dave Cramer
Date:
Subject: Re: Procedure support improvements