Decibel! wrote:
On Nov 2, 2007, at 10:49 AM, Andrew Dunstan wrote:
   update tname set foo = bar ... where foo is null or foo <> bar ...

FYI, you should be able to do WHERE foo IS DISTINCT FROM bar instead.

True, that's a bit nicer. It's still more than somewhat ugly and fragile if there a lot of foos and the bars are complex expressions.

cheers

andrew

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

              http://www.postgresql.org/docs/faq

Reply via email to