Replies: 4 comments 1 reply
-
"scientific notation" is a representation. Psycopg returns just ordinary Python float. I assume you are seeing the way PostgreSQL returns those numbers. Can you make an example please? |
Beta Was this translation helpful? Give feedback.
-
It is actually returning strings for me. I do a fetchall and I get a list of tuples of strings that have my decimals in scientific notation. I did check the type too. It is str.
Sep Dehpour
… On Jul 25, 2022, at 4:24 PM, Daniele Varrazzo ***@***.***> wrote:
"scientific notation" is a representation. Psycopg returns just ordinary Python float.
I assume you are seeing the way PostgreSQL returns those numbers. Can you make an example please?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
I will add an example once I get back in front of my computer.
Sep Dehpour
… On Jul 25, 2022, at 4:24 PM, Daniele Varrazzo ***@***.***> wrote:
"scientific notation" is a representation. Psycopg returns just ordinary Python float.
I assume you are seeing the way PostgreSQL returns those numbers. Can you make an example please?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
The weird part is that it is not consistent. Now it returns them as floats as expected. I will update it here once it returns them in the scientific notation again. |
Beta Was this translation helpful? Give feedback.
-
Hello,
The numeric types are automatically returned by psycopg2 in scientific notation. This is not desired in all cases. How can we make the scientific notation optional?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions