chai icon indicating copy to clipboard operation
chai copied to clipboard

Support ALL Postgres Numeric types. `Decimal` and `Numeric` are unsupported

Open samjewell opened this issue 1 year ago • 2 comments

What version of Chai are you using?

$ chai version
v0.16.0

What did you do?

I tried to create a table:

db.Exec(`CREATE TABLE metrics (BillableSeries DECIMAL, Month TEXT)`)

And got an error:

failed to create table: found DECIMAL, expected ) at line 1, char 38

What did you expect to see?

The Docs say:

ChaiSQL SQL API is compatible with PostgreSQL

So I expected all the Postgres Numeric types to be supported:

smallint
integer
bigint
decimal
numeric
real
double
smallserial
serial
bigserial

But only a fraction of these are actually supported. I know that at least these are not supported:

DECIMAL
NUMERIC

samjewell avatar Nov 05 '24 10:11 samjewell

Yes please. This is a major gap. uint64 cannot fit in any data type available here, with reliability, absent a fixed position decimal type.

cgruber avatar Aug 13 '25 00:08 cgruber

Also ARRAY types (TEXT[]) and JSON/JSONB aren't supported.

cgruber avatar Aug 13 '25 00:08 cgruber