guyren@xxxxxxxxxx writes: > The Halloween problem is that it is a challenge for the database if you’re updating a field that is also in the WHERE clause of the same query. > I just saw a presentation from someone about how in SQL Server he recommended writing changes to a temp table and then writing them to the table as being much more efficient. That's nonsense as far as Postgres is concerned. regards, tom lane