On 2019-02-20 17:45, Rob Nikander wrote:
>> On Feb 20, 2019, at 10:07 AM, Peter Eisentraut
>> wrote:
>>
>> You can run SET TRANSACTION ISOLATION LEVEL in a procedure.
>
> I tried that before but I get this error:
>
> create or replace procedure t_test(n integer)
> as $$
> begin
You
> On Feb 20, 2019, at 10:07 AM, Peter Eisentraut
> wrote:
>
> You can run SET TRANSACTION ISOLATION LEVEL in a procedure.
I tried that before but I get this error:
create or replace procedure t_test(n integer)
as $$
begin
set transaction isolation level serializable;
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 needi
On 2/19/19 1:48 PM, 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
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 `
On 2/19/19 12:31 PM, Rob Nikander wrote:
Hi,
I’m trying to understand how procedures work with transactions. I tried the
code below - it’s a simple procedure to print some notices and commit a
transaction. If I call it from psql after a `begin`, then it gives an error.
What does that error me
On Tuesday, February 19, 2019, Rob Nikander wrote:
> Are procedures not allowed to commit/rollback if they are called within
> in an outer transaction?
>
https://www.postgresql.org/docs/11/sql-call.html
Also, I tried putting a `start transaction` command in the procedure. I got
> another erro
Hi,
I’m trying to understand how procedures work with transactions. I tried the
code below - it’s a simple procedure to print some notices and commit a
transaction. If I call it from psql after a `begin`, then it gives an error.
What does that error mean? Are procedures not allowed to commit/ro