pgDecimal 1.0.0

This Release
pgDecimal 1.0.0
Date
Status
Stable
Abstract
Decimal32 and Decimal64 data types
Released By
okbob
License
PostgreSQL
Special Files
Tags

Extensions

pgDecimal 1.0.0
4 and 8bytes decimal types

README

Contents

pgDecimal

PostgreSQL types based on _Decimal32 and _Decimal64 types.

I wrote this library due performance comparation with PostgreSQL's Numeric type. I would to know how much big impact has fact, so Numeric is varlena type. This initial implementation is based on basic _Decimal support, that is not complete (and check of overflow is slower, than could be with better library). This library contains some basic arithmetic operators and basic casts.

postgres=# CREATE EXTENSION decimal;
CREATE EXTENSION
postgres=# SELECT 3.14::decimal32;
 decimal32 
───────────
 3.14
(1 row)

postgres=# SELECT 3.14::decimal64;
 decimal64 
───────────
 3.14
(1 row)