Weird psql statement rules