Better use: if isinstance(value, int):
instead of if type(value)==int: 2011/3/9 LightOfMooN <vladsale...@yandex.ru> > value=request.vars.myvar > > try: > value = int(value) > except: > pass > > if type(value)==int: > insert(....) > > it rises > <class 'psycopg2.InternalError'>(current transaction is aborted, > commands ignored until end of transaction block) > even if value > 2147483647 > > But why? > It's so strange, because type(value) must be long. -- Pablo Martín Mulone (mar...@tecnodoc.com.ar) http://www.tecnodoc.com.ar/ My blog: http://martin.tecnodoc.com.ar Expert4Solution Profile: http://www.experts4solutions.com/e4s/default/expert/6