I think that Postgres might optimize the subquery. Doesn’t this work?
update foo
set bar = floor(random() * 9 + 1); -- from 1 to 10, inclusive
I think that Postgres might optimize the subquery. Doesn’t this work?
update foo
set bar = floor(random() * 9 + 1); -- from 1 to 10, inclusive