From: SourceForge.net <no...@so...> - 2003-10-25 15:30:33
|
Bugs item #829744, was opened at 2003-10-24 13:52 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116528&aid=829744&group_id=16528 Category: PgInt8 Group: None Status: Open Resolution: None Priority: 5 Submitted By: Mike C. Fletcher (mcfletch) Assigned to: Nobody/Anonymous (nobody) Summary: Int8 values interpreted as int4 Initial Comment: Bigint values inserted from long positive integers in the range 2**31 through 2**32 are retrieved as negative values. Values from 2**32 up are retrieved as value shifted 32 bits right. Result of running the attached script: V:\cinemon>bigint_problem.py -2147483647 -2147483648 0 1 where the input values were: {'curr_up':2147483649L}, {'curr_up':2147483648L}, {'curr_up':4294967296L}, {'curr_up':4294967297L}, PyPgSQL 2.4 Win32 binary release for Python 2.2.3 against PostgreSQL 7.3 on Win32. The values are getting into the database fine, so it looks like something in the database-> python translation that's getting messed up: V:\cinemon>psql cinemon Welcome to psql 7.3.4, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help on internal slash commands \g or terminate with semicolon to execute query \q to quit cinemon=# select esn,curr_up from terayon_in where esn='someserial'; esn | curr_up ------------+------------ someserial | 2147483649 someserial | 2147483648 someserial | 4294967296 someserial | 4294967297 (4 rows) cinemon=# \d terayon_in Table "public.terayon_in" Column | Type | Modifiers -----------+--------------------------+---------------------------------- esn | character varying | curr_up | bigint | default 0 curr_down | bigint | default 0 ... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116528&aid=829744&group_id=16528 |