I've got a problem with updating data for each row in the acrticles_pl_vector table using function in set clause and data take from another table.
For example I have a pseudocode:
CREATE OR REPLACE FUNCTION updateTsvector ()
RETURNS status AS
$$
BEGIN
FOR EACH ROW otherTable
UPDATE acrticles_pl_vector
set vector = to_tsvector('polish', otherTable.title || otherTable.content);
WHERE id = otherTable.id
END;
$$
LANGUAGE plpgsql
Thanks in advance!