I want to add e-mails numbered from 1 to 100. So effectively I want to do something like:
tmp := 0
update user SET tmp = tmp + 1, email = 'test' || TO_CHAR(tmp,'fm00000') || '@example.com'
where removed = false
ORDER BY id
limit 100;
And preferably would like it to work in 8.3. Note - I cannot use ids as they are not from 1 to 100 in the selected rows.
Edit: Forgot I'm on 8.3...
INSERT, notUPDATE