Postgresql – Is a HAVING condition with no aggregate always exactly equivalent to WHERE?
I recently ran across an interesting comment in the PostgreSQL test suite: -- HAVING is effectively equivalent to WHERE in this case SELECT b, c FROM test_having GROUP BY b, c HAVING b = 3 ORDER BY b, c; It…