Re: How to use read uncommitted transaction level and set update order

Поиск
Список
Период
Сортировка
От Andrus
Тема Re: How to use read uncommitted transaction level and set update order
Дата
Msg-id DEA9201791A244A0894EB6823BC192CF@andrusnotebook
обсуждение исходный текст
Ответ на Re: How to use read uncommitted transaction level and set update order  (Christophe Pettus <xof@thebuild.com>)
Ответы Re: How to use read uncommitted transaction level and set update order  (Scott Marlowe <scott.marlowe@gmail.com>)
Re: How to use read uncommitted transaction level and set update order  (Christophe Pettus <xof@thebuild.com>)
Список pgsql-general
> You cannot access new values of a  particular row within a single UPDATE
> statement, but you do see new  values done in the same transaction.
> This is explain in some detail in the documentation:
>
> http://www.postgresql.org/docs/8.4/interactive/transaction-iso.html#XACT-READ-COMMITTED

I tried

drop table if exists tt ;
create temp table tt ( a int, b int );
insert into tt values ( 1,2);
insert into tt values ( 3,4);
update tt set a=a*10, b=(select sum(a) from tt);
select * from tt

b has value 4 for every row.

So we *dont* see new  values done in the same transaction.
How to fix ?

Andrus.


В списке pgsql-general по дате отправления:

Предыдущее
От: "Gauthier, Dave"
Дата:
Сообщение: Re: defining yuor own commands in PG ?
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: How to use read uncommitted transaction level and set update order