PostgreSQL extension with functions and aggregates for financial calculations