Postgres node updates both "Update Key" and "Columns"

The Postgres node tries to update both “Update Key” and “Columns”, when only “Columns” is expected to be updated.

The generated query is as such:

update "default"."table" as t set "id"=v."id","value"=v."value"
from (values('id1',1),('id2',2)) as v("id","value")
WHERE v."id" = t."id"
RETURNING *

As you can see, both ‘id’ and ‘value’ are being updated, which requires the user to have permissions writing on the ‘id’ column, when only the ‘value’ column is expected to change, as it’s the only column on the “Columns” parameter.

2 Likes

Hi @miguel-mconf, good spot, thanks so much for pointing this out! I’ve added this to our internal list of possible improvements. In the meantime, you might want to consider writing the update queries manually as needed using the Execute Query operation of the node.