Sorry, stupid me - it's not a bug, pg is perfectly right! The query was just wrong, because I used the wrong column in the SUM(...) function. Sorry again, Corin
pgsql-bugs by date:
Соглашаюсь с условиями обработки персональных данных