Re: [HACKERS] Strange transaction-id behaviour? (was Re: [GENERAL] Two updates problem)

2005-06-09 Thread Tom Lane
Richard Huxton writes: > I'm not sure it's sensible to have the update in the WHERE clause - I > don't know that you can depend on how many times that function will be > called. It's absolutely not very sensible to do that ... note the warnings in http://www.postgresql.org/docs/8.0/static/sql-e

Strange transaction-id behaviour? (was Re: [GENERAL] Two updates problem)

2005-06-09 Thread Richard Huxton
Yuri B. Lukyanov wrote: I have table: and function: But this thing don't work: UPDATE test SET text2='test' WHERE id = (SELECT test1()); (rows affected: 0) Why? There is two updates on the same row, but work only first update (in the function). Maybe it's bug? Hmm - PostgreSQL has a tran