"Jan Szumiec" <jan(dot)szumie(at)infiniteloop(dot)eu> writes: > UPDATE items SET (type, post_id) = (INSERT INTO efforts (effort) VALUES > (667) RETURNING 'Item', id) WHERE id = 1937 Sorry, RETURNING is only supported at the top level of a query. regards, tom lane