This project is archived and is in readonly mode.
Error on processing placeholders with negative integer
Reported by Psycopg website | 2011-05-29 22:44:35 UTC
Submitted by: nk.0@ya.ru (Konstantin Nikitin)
Here is my error log
import psycopg2 connection = psycopg2.connect("user=konstantin dbname=konstantin") cursor = connection.cursor() cursor.execute("select 1-%s from table", (2, )) cursor.fetchall() [(-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,)] cursor.execute("select 1-%s from table", (-1, )) cursor.fetchall() [(1,)] cursor.execute("select 1 - %s from table", (-1, )) cursor.fetchall() [(2,), (2,), (2,), (2,), (2,), (2,), (2,), (2,)]
Comments and changes to this ticket
-

xni 2011-05-30 22:20:32 UTC
This issue is fixed in 2.4.2
https://github.com/dvarrazzo/psycopg/commit/281427f450d6e9755d4c3cb...
-

Daniele Varrazzo 2011-06-03 10:25:27 UTC
- State changed from new to resolved
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
WARNING: the informations in this tracker are archived. Please submit new tickets or comments to the new tracker.
Psycopg is the most used PostgreSQL adapter for the Python programming language. At the core it fully implements the Python DB API 2.0 specifications. Several extensions allow access to many of the features offered by PostgreSQL.