Re: Transaction control in procedures - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Transaction control in procedures
Date
Msg-id 065dcd78-c188-2771-a010-344711c2436d@2ndquadrant.com
Whole thread Raw
In response to Re: Transaction control in procedures  (legrand legrand <legrand_legrand@hotmail.com>)
Responses RE: Transaction control in procedures  (legrand legrand <legrand_legrand@hotmail.com>)
List pgsql-hackers
On 11/14/17 17:40, legrand legrand wrote:
> will that kind of statement (that is permitted with Oracle but gives errors
> ora-1555 snapshot too old) be permitted ?
> 
> begin
>  for c in (select id from tab where cond='blabla')
>  loop
>     update tab set x=1 where id=c.id;
>     commit;
>  end loop;
> end;

Hmm, that currently results in

ERROR:  cannot commit while a portal is pinned

You say this fails in Oracle too.  Are we supposed to make this work
somehow?

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] Re: protocol version negotiation (Re: LibpqPGRES_COPY_BOTH - version compatibility)
Next
From: Tom Lane
Date:
Subject: Re: Fix number skipping in to_number