I isolatet the problem from a much more complex query. Here the test scenario
DROP TABLE test; CREATE TABLE test ( id integer, description varchar(100)
Are you missing an IN: ... WHERE id IN (UPDATE ...?
IN
... WHERE id IN (UPDATE ...
However if I only run the statemennt "UPDATE test set value='test' RETURNING id", I get a result with 2 rows. Why is that?
Your UPDATE has no WHERE clause and therefore it updates every row, of which there are two.
UPDATE
WHERE