Lets say that I have a simple SQL script:
UPDATE my_table
SET data = new_data
WHERE my_table.data IS NULL;
I would like to print which id's that where updated in the UPDATE command. So something like this functionality-wise:
UPDATE my_table
SET data = new_data, RAISE NOTICE 'Updated %', my_table.id
WHERE my_table.data IS NULL;
Is this possible? I am using PostgreSQL.