Hi Pavel, Nice! I tested it and works fine.
BTW, Which is the issue tracker for report bugs related to fdb ? Which is the correct svn url to check the source code out ? Regards. ________________________________ De: Pavel Cisar <[email protected]> Para: [email protected] Enviado: lunes, 29 de octubre de 2012 12:23 Asunto: Re: [firebird-python] [fdb] Fail on insert BIGINT limits values Hi, Good catch (issue introduced by fix to PYFB-22). Fixed corrected. Checkout the svn head. best regards Pavel Cisar IBPhoenix Dne 29.10.2012 14:56, Maximiliano Robaina napsal(a): > Hi, > > In fdb, the BIGINT fail on insert with lower limit value. > > >>>> import fdb >>>> >>>> maxval = 9223372036854775807 >>>> minval = -maxval - 1 >>>> >>>> conn = fdb.connect(dsn='django-test', user='sysdba', password='masterkey') >>>> cur.execute('INSERT INTO MODEL_FIELDS_BIGINT("VALUE") VALUES (?)', >>>> [minval]) > Traceback (most recent call last): > File "<console>", line 1, in <module> > File "/usr/local/lib/python2.7/dist-packages/fdb/fbcore.py", line 2697, in >execute > self._ps._execute(parameters) > File "/usr/local/lib/python2.7/dist-packages/fdb/fbcore.py", line 2375, in >_execute > self.__Tuple2XSQLDA(self.in_sqlda, parameters) > File "/usr/local/lib/python2.7/dist-packages/fdb/fbcore.py", line 2217, in >__Tuple2XSQLDA > int_to_bytes(value, sqlvar.sqllen))), buf_pointer) > File "/usr/local/lib/python2.7/dist-packages/fdb/fbcore.py", line 443, in >int_to_bytes > return struct.pack(fmt, val) > error: integer out of range for 'Q' format code >>>> > > > > The table structure is: > > CREATE TABLE MODEL_FIELDS_BIGINT > ( > ID Integer NOT NULL, > "VALUE" Bigint NOT NULL, > NULL_VALUE Bigint, > PRIMARY KEY (ID) > ); > > > > > -- > Maxi > > > b: http://maxirobaina.tumblr.com > t: http://twitter.com/maxirobaina > >
