News for hackers. Stuff that matters.
Re:My Favorite PostgreSQL Queries and Why They Matter by infogulch on Sunday April 15, 2018 @04:24PM (#16844751)
I was looking through the thread for this solution. It's great because it's much harder to mess up and is less verbose than a case, and it's built on common SQL features making it portable and fast and easy to grok (as long as both the engine and the dba knows how joins work).

As a data analyst this technique is also great for scrubbing dirty data at query time when you don't have the ability to just fix it.

Re:My Favorite PostgreSQL Queries and Why They Matter by ilikepi on Sunday April 15, 2018 @04:32PM (#16844786)
Yeah, I use it in queries as well. Good point!