Search Postgresql Archives

How to use read uncommitted transaction level and set update order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



How to use column values set in update in subsequent set clauses and in subqueries in subsequent row updates?

I tried

set transaction isolation level read uncommitted;
create temp table test1 ( a int, b int) on commit drop;
insert into test1 values(1,2);
update test1 set a=4, b=a ;
select * from test1

b value is 1 but must be 4.
How to use updated value ?


For update order I tried

set transaction isolation level read uncommitted;
create temp table test1 ( a int, b int, c int) on commit drop;
insert into test1 values(1,2,3);
update test1 set a=4, b=a order by c ;
select * from test1

but got syntax error at order by.

How to specify update order ?

Andrus.

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux