--- Tom Lane <tgl@sss.pgh.pa.us> escreveu:
> "Euler Taveira de Oliveira" <eulerto@yahoo.com.br> writes:
> > I just execute the same transaction in 2 different backends and I
> got the
> > message: 'attempted to update invisible tuple'.
>
> If you want this investigated then you'll need to provide a
> self-contained example. We have other things to do than guess about
> the contents of your database...
>
Sorry for that. I didn't have the data yet. Some data to test it is in:
http://www.timbira.com/tst2.sql.gz
In 8.0 and previous I didn't reproduce it. Is it something related to
UPDATE ... FROM patch that I submitted?
I just execute the same transaction in 2 different backends and I got
the message: 'attempted to update invisible tuple'. In the first
transaction I execute: BEGIN - UPDATE and then open the other
transaction and execute: BEGIN - UPDATE so I commit the first one and
got that message.
========== first transaction =========================
tst=# begin;
BEGIN
tst=# update produtos set estoque = estoque - itensmov.qtde from
itensmov
where trim(itensmov.codigo) = 'C0001' and itensmov.fk_produto =
produtos.id_produto and produtos.controlarestoque = 'S';
UPDATE 21
tst=# commit;
COMMIT
tst=#
========== first transaction =========================
========== second transaction ========================
tst=# begin;
BEGIN
tst=# update produtos set estoque = estoque - itensmov.qtde from
itensmov
where trim(itensmov.codigo) = 'C0003' and itensmov.fk_produto =
produtos.id_produto and produtos.controlarestoque = 'S';
ERRO: attempted to update invisible tuple
tst=#
========== second transaction ========================
Euler Taveira de Oliveira
euler[at]yahoo_com_br
_______________________________________________________
Yahoo! doce lar. Faça do Yahoo! sua homepage.
http://br.yahoo.com/homepageset.html