-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
toField (1 :: Scientific)
should be Escape "1"
#79
Comments
https://www.postgresql.org/docs/9.1/datatype-numeric.html says
I'm confused. Are you sure PostgreSQL stores |
|
How it would store |
I'm not sure... I didn't find functions which can get the precision and scale of a numeric value. But always using scientific notation would make sense. Then it's PostgreSQL's responsibility to minimize the storage cost. I guess there is no downside to use scientific notation? |
There're only 5 inserts but 8 rows. What If that works, I don't see any downsides of using scientific notation for |
(I was continuing the previous example. Guess I should
|
Currently,
ToField Scientific
is usingscientificBuilder
, which outputs1.0
for 1. This causes PostgreSQL to waste one additional digit's space when inserting 1 into anumeric
field. I expect 1 to be stored as1
instead of1.0
.According to a collaborator of
scientific
, formatting 1 as1.0
is intended. I thinkpostgresql-simple
should not usescientificBuilder
to formatScientific
s in queries.The text was updated successfully, but these errors were encountered: