Wow that's a bad example. Any decent query engine (which I'm assuming Postgres has) would reuse common subexpressions.
Even if duplicate expressions are optimized by the engine, they hurt the readability and maintainability of the query, especially if they are big and complex.