"Number" types #116
Replies: 7 comments
-
I did some basic performance testing by taking the |
Beta Was this translation helpful? Give feedback.
-
One of the problems (for a select few users) w.r.t. using these types as a "catch-all" is that neither can be cast to boolean without first being cast to integer. |
Beta Was this translation helpful? Give feedback.
-
@kgodey , @ghislaineguerin , @pavish I think I'm convinced that if we want a catch-all number type, numeric is more appropriate than float at this point. What do you think? |
Beta Was this translation helpful? Give feedback.
-
It's resoundingly not recommended to use |
Beta Was this translation helpful? Give feedback.
-
@mathemancer let's go with |
Beta Was this translation helpful? Give feedback.
-
I think |
Beta Was this translation helpful? Give feedback.
-
I agree with using |
Beta Was this translation helpful? Give feedback.
-
PostgreSQL offers three main categories of number types (unfortunately, the docs refer to these as "numeric" types, one of which is the
NUMERIC
type).We need to figure out what number type(s) to use for the MVP. If we want a "catch-all", we should probably use either the
FLOAT
orNUMERIC
type.Floats
Pros
Cons
0
after the decimal point to look nice.Numerics (Decimal type)
Pros
int
in python when no decimal point,decimal.Decimal
otherwiseCons
Beta Was this translation helpful? Give feedback.
All reactions