Open silentlight opened 4 years ago
https://www.postgresql.org/docs/current/datatype-numeric.html
+10000000000000000000
is too large for PostgreSQL's bigint.
psql> SELECT '+10000000000000000000'::bigint;
ERROR: value "+10000000000000000000" is out of range for type bigint
LINE 1: SELECT '+10000000000000000000'::bigint;
Try numeric.
psql> SELECT '+10000000000000000000'::numeric;
┌──────────────────────┐
│ numeric │
├──────────────────────┤
│ 10000000000000000000 │
└──────────────────────┘
(1 row)
I need to store
+10000000000000000000
this number as BIGINT type. Is it possible? I see that pq automatically converts BIGINT to int64 but in the case of above number it return undefined since I guess number does not fit to int64. Any ideas?