From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Rob Nikander <rob.nikander@gmail.com>
To: Postgres General <pgsql-general@postgresql.org>
Subject: Re: procedures and transactions
Date: Wed, 20 Feb 2019 17:07:37 +0100
Message-ID: <6299b758-7851-0a6d-8bb6-8c2956d03c74@2ndquadrant.com> (raw)
In-Reply-To: <72DE4DF2-7013-4D03-AD28-426BFD1B78A0@gmail.com>
References: <FB0D74E9-6CAE-4FDD-BAD6-8AA31169F363@gmail.com>
<CAKFQuwYdbkOv3HAGo=heMDQB9zs5_31mK2FR05sYVHXmq4u+Pg@mail.gmail.com>
<72DE4DF2-7013-4D03-AD28-426BFD1B78A0@gmail.com>
On 2019-02-19 22:48, Rob Nikander wrote:
> I thought if I had some application logic that needed a certain kind of
> transaction (maybe a non-default isolation level), I could hide that
> fact in a procedure. App code (Java/Python/whatever) could remain
> unaware of transactions (except maybe needing to retry after a failure)
> and simply send `call foo(?, ?)` to the DB.
You can run SET TRANSACTION ISOLATION LEVEL in a procedure.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: peter.eisentraut@2ndquadrant.com, rob.nikander@gmail.com
Subject: Re: procedures and transactions
In-Reply-To: <6299b758-7851-0a6d-8bb6-8c2956d03c74@2ndquadrant.com>
References: <FB0D74E9-6CAE-4FDD-BAD6-8AA31169F363@gmail.com> <CAKFQuwYdbkOv3HAGo=heMDQB9zs5_31mK2FR05sYVHXmq4u+Pg@mail.gmail.com> <72DE4DF2-7013-4D03-AD28-426BFD1B78A0@gmail.com> <6299b758-7851-0a6d-8bb6-8c2956d03c74@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox