I got a table in which a column named items and its value is '' which is around 1000 of rows, how can we query in PostgreSQL using stored procedure to rename each items to a unique value like column with an incremental value i.e
items0001, items0002, items003,.....items1000
Tried this but its not working
UPDATE product SET items=CASE
WHEN items='' THEN items='items'+1
ELSE items123
END