Go to file
Bruce Momjian 92798de02e This is a bug in python interface module,
postgresql-7.3.3/src/interfaces/python/pg.py.

_quote() function fails due to integer overflow if input d is larger
than max integer.

In the case where the column type is "BIGINT", the input d may very well
be larger than max integer while its type, t, is labeled 'int'.
The conversion on line 19, return "%d" % int(d), will fail due to
"OverflowError: long int too large to convert to int".



Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------

[1] create a table with a column type 'BIGINT'.
[2] use pg.DB.insert() to insert a value that is larger than max integer

If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------

Just changing the conversion at line 19 of pg.py to long(d) instead of
int(d) should fix it. The following is a patch:

Chih-Hao Huang
2003-06-25 01:09:24 +00:00
config Remove references to sa_family_t, except when SOCKADDR_STORAGE requires 2003-06-23 23:52:00 +00:00
contrib Jim C. Nasby wrote: 2003-06-24 22:59:46 +00:00
doc Most of the synopsis areas for DROP commands use "name" as the 2003-06-24 23:29:25 +00:00
src This is a bug in python interface module, 2003-06-25 01:09:24 +00:00
COPYRIGHT Update copyright to 2002. 2002-06-20 20:29:54 +00:00
GNUmakefile.in First step to removing /contrib/retep, with Peter Mount's approval. 2002-10-21 00:12:46 +00:00
HISTORY Fix misstatement in release-notes item. 2003-05-26 18:58:26 +00:00
INSTALL Regenerate 2002-11-21 23:33:22 +00:00
Makefile Restructure the key include files per recent pghackers discussion: there 2001-02-10 02:31:31 +00:00
README Improve wording. 2002-11-11 20:03:40 +00:00
aclocal.m4 Remove leftovers from subproject removals. Fixes for Python and Kerberos 2002-09-04 22:54:18 +00:00
configure Remove references to sa_family_t, except when SOCKADDR_STORAGE requires 2003-06-23 23:52:00 +00:00
configure.in Remove references to sa_family_t, except when SOCKADDR_STORAGE requires 2003-06-23 23:52:00 +00:00
register.txt Update URL to point to proper location. 2003-06-02 15:01:03 +00:00

README

PostgreSQL Database Management System
=====================================
  
This directory contains the source code distribution of the PostgreSQL
database management system.

PostgreSQL is an advanced object-relational database management system
that supports an extended subset of the SQL standard, including
transactions, foreign keys, subqueries, triggers, user-defined types
and functions.  This distribution also contains several language
bindings, including C, Perl, Python, and Tcl, as well as a JDBC
driver.

The ODBC and C++ interfaces have been moved to the PostgreSQL Projects
Web Site at http://gborg.postgresql.org for separate maintenance.

See the file INSTALL for instructions on how to build and install
PostgreSQL.  That file also lists supported operating systems and
hardware platforms and contains information regarding any other
software packages that are required to build or run the PostgreSQL
system.  Changes between all PostgreSQL releases are recorded in the
file HISTORY.  Copyright and license information can be found in the
file COPYRIGHT.  A comprehensive documentation set is included in this
distribution; it can be read as described in the installation
instructions.

The latest version of this software may be obtained at
ftp://ftp.postgresql.org/pub/.  For more information look at our web
site located at http://www.postgresql.org/.