4 ms·
This would also require adding the ORDER BY clause, as there might be applications where the order in which they are updated matters.
by samus 3y ago
This would also require adding the ORDER BY clause, as there might be applications where the order in which they are updated matters.
- enormousness 3y agoIs not any single query in Postgres a transaction? I don't think individual rows would be visible outside that transaction until all are updated.
- samus 3y agoThe question is which rows would be updated by a single execution of a UPDATE...LIMIT query. The order of result rows of a SELECT query is undefined in Postgres unless you add an ORDER BY clause. It is natural to assume that an UPDATE...LIMIT would be similarly affected.