BUG: 15265: Broken PostgreSQL queries (by Nils Gladitz)