Rounding numbers from copy expert

Поиск
Список
Период
Сортировка
От John Abraham
Тема Rounding numbers from copy expert
Дата
Msg-id 8DC745DF-DDF9-4697-BAAF-23ABE78A1EB9@hbaspecto.com
обсуждение исходный текст
Ответы Re: Rounding numbers from copy expert
Список psycopg
Hmm, I have two machines connecting to the same database running the same query inside copy_expert.

Both seem to have psycopg2 2.7.5 (based on pip3 freeze).

One seems to be rounding the double precision number 696538951.985381 to 6.96538944E8 whereas the other machine isn't rounding it.

This is causing auditability/repeatability problems, as the difference is actually significant in this context.

Is there some thing about the way psycopg2 connects to the database, or the way psycopg2 is configured, that could be causing this rounding? Is there some way to express a preference for scientific notation?  

I'm at a complete loss as to why copy_expert (which basically does a 'copy to stdin' query) would be different when called from different machines. My next step in the madness is to see if the locale has an effect, one is set to en_CA.UTF-8 and the other is set to en_US.UTF-8.  But, perhaps someone else has a better idea. 

Thanks for any help. 

--
John Abraham
403-232-1060

В списке psycopg по дате отправления:

Предыдущее
От: Aryeh Leib Taurog
Дата:
Сообщение: pgcopy 1.4.0 release announcement
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Rounding numbers from copy expert