antoniop
committed
on 16 Nov 17
Reduce divergency between oracle and postgres codebase, fix query