<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/postgresql.git/src/interfaces/python, branch master</title>
<subtitle>git.postgresql.org: git/postgresql.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/postgresql.git/'/>
<entry>
<title>remove python module, as its moved to http://www.pygresql.org</title>
<updated>2003-08-01T04:19:06+00:00</updated>
<author>
<name>Marc G. Fournier</name>
<email>scrappy@hub.org</email>
</author>
<published>2003-08-01T04:19:06+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/postgresql.git/commit/?id=13a0e910cd34bf765ed83fd3593c69958ea46427'/>
<id>13a0e910cd34bf765ed83fd3593c69958ea46427</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>This is a bug in python interface module,</title>
<updated>2003-06-25T01:09:24+00:00</updated>
<author>
<name>Bruce Momjian</name>
<email>bruce@momjian.us</email>
</author>
<published>2003-06-25T01:09:24+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/postgresql.git/commit/?id=92798de02ef3a27469f46e6a0996b97ec98d0c0c'/>
<id>92798de02ef3a27469f46e6a0996b97ec98d0c0c</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>I succeeded by fixing up setup.py:</title>
<updated>2003-06-12T02:15:09+00:00</updated>
<author>
<name>Bruce Momjian</name>
<email>bruce@momjian.us</email>
</author>
<published>2003-06-12T02:15:09+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/postgresql.git/commit/?id=1cef8ea790e692713c7685b4e8d2a832896d66f3'/>
<id>1cef8ea790e692713c7685b4e8d2a832896d66f3</id>
<content type='text'>
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
--- setup.py~   Tue Mar 19 08:21:14 2002
+++ setup.py    Wed May 14 15:10:30 2003
@@ -30,8 +30,8 @@
        optional_libs=[ 'libpqdll', 'wsock32', 'advapi32' ]
        data_files = [ 'libpq.dll' ]
 else:
-       include_dirs=['/usr/include/pgsql']
-       library_dirs=['usr/lib/pgsql']
+       include_dirs=['../../include','../libpq','/usr/include/pgsql']
+       library_dirs=['../libpq','/usr/lib/pgsql']
        optional_libs=['pq']
        data_files = []
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

George Young
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
--- setup.py~   Tue Mar 19 08:21:14 2002
+++ setup.py    Wed May 14 15:10:30 2003
@@ -30,8 +30,8 @@
        optional_libs=[ 'libpqdll', 'wsock32', 'advapi32' ]
        data_files = [ 'libpq.dll' ]
 else:
-       include_dirs=['/usr/include/pgsql']
-       library_dirs=['usr/lib/pgsql']
+       include_dirs=['../../include','../libpq','/usr/include/pgsql']
+       library_dirs=['../libpq','/usr/lib/pgsql']
        optional_libs=['pq']
        data_files = []
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

George Young
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace functional-index facility with expressional indexes.  Any column</title>
<updated>2003-05-28T16:04:02+00:00</updated>
<author>
<name>Tom Lane</name>
<email>tgl@sss.pgh.pa.us</email>
</author>
<published>2003-05-28T16:04:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/postgresql.git/commit/?id=fc8d970cbcdd6f025475822a4cf01dfda0873226'/>
<id>fc8d970cbcdd6f025475822a4cf01dfda0873226</id>
<content type='text'>
of an index can now be a computed expression instead of a simple variable.
Restrictions on expressions are the same as for predicates (only immutable
functions, no sub-selects).  This fixes problems recently introduced with
inlining SQL functions, because the inlining transformation is applied to
both expression trees so the planner can still match them up.  Along the
way, improve efficiency of handling index predicates (both predicates and
index expressions are now cached by the relcache) and fix 7.3 oversight
that didn't record dependencies of predicate expressions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
of an index can now be a computed expression instead of a simple variable.
Restrictions on expressions are the same as for predicates (only immutable
functions, no sub-selects).  This fixes problems recently introduced with
inlining SQL functions, because the inlining transformation is applied to
both expression trees so the planner can still match them up.  Along the
way, improve efficiency of handling index predicates (both predicates and
index expressions are now cached by the relcache) and fix 7.3 oversight
that didn't record dependencies of predicate expressions.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use closesocket() for all socket/pipe closing, because Win32 requires</title>
<updated>2003-04-25T01:24:00+00:00</updated>
<author>
<name>Bruce Momjian</name>
<email>bruce@momjian.us</email>
</author>
<published>2003-04-25T01:24:00+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/postgresql.git/commit/?id=db7e46a76dc5ea8f15ed0ca67cc232b5ea38938d'/>
<id>db7e46a76dc5ea8f15ed0ca67cc232b5ea38938d</id>
<content type='text'>
it, and map that to close() on Unix.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
it, and map that to close() on Unix.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use PQfreemem() consistently, and document its use for Notify.</title>
<updated>2003-03-25T02:44:36+00:00</updated>
<author>
<name>Bruce Momjian</name>
<email>bruce@momjian.us</email>
</author>
<published>2003-03-25T02:44:36+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/postgresql.git/commit/?id=f1792b932c574eada6527a87e2489364f700fca4'/>
<id>f1792b932c574eada6527a87e2489364f700fca4</id>
<content type='text'>
Keep PQfreeNotify() around for binary compatibility.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Keep PQfreeNotify() around for binary compatibility.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make "win" a separate port from "cygwin".  This means you can now</title>
<updated>2003-03-21T17:18:34+00:00</updated>
<author>
<name>Peter Eisentraut</name>
<email>peter_e@gmx.net</email>
</author>
<published>2003-03-21T17:18:34+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/postgresql.git/commit/?id=1a7f4ed5252dd08d9bbf26a67ddf22c38528c636'/>
<id>1a7f4ed5252dd08d9bbf26a67ddf22c38528c636</id>
<content type='text'>
configure under native Windows (MinGW that is), but you won't get very far
compiling yet.  The dynaloader files are from Jan Wieck's patch set.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
configure under native Windows (MinGW that is), but you won't get very far
compiling yet.  The dynaloader files are from Jan Wieck's patch set.
</pre>
</div>
</content>
</entry>
<entry>
<title>This patch fixes a bunch of spelling mistakes in comments throughout the</title>
<updated>2003-03-10T22:28:22+00:00</updated>
<author>
<name>Tom Lane</name>
<email>tgl@sss.pgh.pa.us</email>
</author>
<published>2003-03-10T22:28:22+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/postgresql.git/commit/?id=e4704001ea4c3d63b53e8783859ff598ef2f69e5'/>
<id>e4704001ea4c3d63b53e8783859ff598ef2f69e5</id>
<content type='text'>
PostgreSQL source code.

Neil Conway
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PostgreSQL source code.

Neil Conway
</pre>
</div>
</content>
</entry>
<entry>
<title>The quote function should return a string suitable for dropping into a</title>
<updated>2003-02-26T13:16:50+00:00</updated>
<author>
<name>D'Arcy J.M. Cain</name>
<email>darcy@druid.net</email>
</author>
<published>2003-02-26T13:16:50+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/postgresql.git/commit/?id=9ff872a27233d5e02e55e9572a4b8161e0186cba'/>
<id>9ff872a27233d5e02e55e9572a4b8161e0186cba</id>
<content type='text'>
query string.  This fixes a bug where bool types sometimes returned with
a string that could not be dropped into a query.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
query string.  This fixes a bug where bool types sometimes returned with
a string that could not be dropped into a query.
</pre>
</div>
</content>
</entry>
<entry>
<title>Correction to last patch.  As per the DB-API spec, we need to return None</title>
<updated>2003-01-08T13:42:16+00:00</updated>
<author>
<name>D'Arcy J.M. Cain</name>
<email>darcy@druid.net</email>
</author>
<published>2003-01-08T13:42:16+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/postgresql.git/commit/?id=6f14e2771a6e0a8f80a8d93e83e7d51df43c6283'/>
<id>6f14e2771a6e0a8f80a8d93e83e7d51df43c6283</id>
<content type='text'>
here, not -1.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
here, not -1.
</pre>
</div>
</content>
</entry>
</feed>
