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

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

2005-06-09 Thread Tom Lane
Richard Huxton dev@archonet.com 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

[GENERAL] Two updates problem

2005-06-08 Thread Yuri B. Lukyanov
I have table: CREATE TABLE public.test ( id INTEGER, text1 VARCHAR(25), text2 VARCHAR(25) ) WITH OIDS; INSERT INTO test VALUES (1, 'qwerty', '111'); INSERT INTO test VALUES (2, 'asdfgh', '222'); and