[Sqlrelay-discussion] Buggy Oracle numbers processing in python client
Brought to you by:
mused
From: Renat S. <sr...@st...> - 2011-10-18 14:20:35
|
Hi! There is a proble came up with 0.42. In this version python client for SQLRelay treats numbers as integers. It is completely wrong. Not only do numbers with fractions lose all after decimal point, but some numbers also do not fit to binary integers and got int64_max value. Example: from SQLRelay import PySQLRDB con=PySQLRDB.connect('localhost',19000,'','ow_develop','ow_develop',0,1) cur=con.cursor() cur.execute('select 12345678901234567890123456789012345678, \ 123.456 from dual') print (cur.fetchall()) ------- $ python test.py [[9223372036854775807L, 123L]] N.B. Numbers in oracle have up to 38 digits I suggest to return to string representation for numbers. -- Renat Sabitov e-mail: sr...@st... Stack Soft jid: sr...@ja... |