chotchki / feophant

A PostgreSQL inspired SQL database written in Rust.
GNU Affero General Public License v3.0
27 stars 1 forks source link

Implement the numeric type #35

Open chotchki opened 2 years ago

chotchki commented 2 years ago

Postgres has arbitrary precision types that are critical for financial applications.

Implementing them will require a picking up a rust arbitrary precision library such as https://www.postgresql.org/docs/current/datatype-numeric.html

Right now the most reasonable library seems to have major limitations https://github.com/alkis/decimal and is basically a wrapper of the C library http://speleotrove.com/decimal/.

chotchki commented 2 years ago

This library looks far better for doing the decimal work: https://github.com/paupino/rust-decimal