Re: Procedure support improvements - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: Procedure support improvements
Date
Msg-id CADK3HHLbnfG5TTuMyTt3CrS7nYvXxLhdwNBJt3sEp-053pbc=g@mail.gmail.com
Whole thread Raw
In response to Re: Procedure support improvements  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-jdbc


On Mon, 26 Aug 2019 at 14:14, Tom Lane <tgl@sss.pgh.pa.us> wrote:
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.

I'm less than motivated to hack the driver to make something work here until we finish the server feature.

Who knows what that might bring ?




pgsql-jdbc by date:

Previous
From: Tom Lane
Date:
Subject: Re: Procedure support improvements
Next
From: Dave Cramer
Date:
Subject: Re: Recommendations for PGBouncer interacting with HikariCP