Re: Transaction control in procedures

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: legrand legrand <legrand_legrand(at)hotmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Transaction control in procedures
Date: 2017-11-15 21:21:56
Message-ID: 065dcd78-c188-2771-a010-344711c2436d@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-11-15 21:28:48 Re: Fix number skipping in to_number
Previous Message Robert Haas 2017-11-15 21:11:35 Re: [HACKERS] Re: protocol version negotiation (Re: Libpq PGRES_COPY_BOTH - version compatibility)