Bugs item #625121, was opened at 2002-10-18 11:47
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=116528&aid=625121&group_id=16528
Category: PgBoolean
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Alexander Meisel (alex)
Assigned to: Billy G. Allie (ballie01)
>Summary: Error in cursor.rowcount
Initial Comment:
Hi,
I'm using Redhat 7.2 on a alpha (not i386) with
PostgreSQL 7.2.3.
A simple query which actually succeeds gives a -1 back
on cursor.rowcount ...
My test scipt looks like this:
---
#!/opt/bin/python2.2
from pyPgSQL import PgSQL
c = PgSQL.connect('user=alex dbname=kerneldb
host=localhost')
c1 = c.cursor()
c1.execute("SELECT * FROM project")
print c1.rowcount
data = c1.fetchall()
print data
---
The scripts output is:
---
[alex@wormhole alex]$ ./dbtest.py
-1
[[1, 'linux', '']]
[alex@wormhole alex]$
---
I did run the test script in your source distributuion,
it had the following output:
---
bash-2.05$ python2.2 PgSQLTestCases.py
.............F....................................................
======================================================================
FAIL: CheckBooleanConstructors
(__main__.PgSQLTestModuleInterface)
----------------------------------------------------------------------
Traceback (most recent call last):
File "PgSQLTestCases.py", line 167, in
CheckBooleanConstructors
'PgBooleanFromInteger failed to create a FALSE
value (1).')
File "/opt/lib/python2.2/unittest.py", line 258, in
failIf
if expr: raise self.failureException, msg
AssertionError: PgBooleanFromInteger failed to create a
FALSE value (1).
----------------------------------------------------------------------
Ran 66 tests in 3.574s
FAILED (failures=1)
----
Hope you can fix it soon ... or I have to abandom my
lovely alpha and replace the db server with a horrible
intel machine. :-(
Thx in advance!
Alex
----------------------------------------------------------------------
>Comment By: Gerhard Häring (ghaering)
Date: 2002-10-19 16:41
Message:
Logged In: YES
user_id=163326
Fixed in revision 1.25 of libpqmodule.c.
Alex, we'll likely release a beta version of pyPgSQL 2.3
this weekend, and I'd be glad if you could check if it'll
work for you.
----------------------------------------------------------------------
Comment By: Gerhard Häring (ghaering)
Date: 2002-10-19 15:49
Message:
Logged In: YES
user_id=163326
Ok, got it. In:
pgboolean.c:libPQbool_FromInt
ParseTuple needs an "l" format character to parse into a
long, instead of a "i".
I'll check all the other format strings, too, then check the
change in.
----------------------------------------------------------------------
Comment By: Gerhard Häring (ghaering)
Date: 2002-10-19 14:48
Message:
Logged In: YES
user_id=163326
Ok, I'll see what I can find out about the Alpha ..... Damn,
the SF folks did install a PostgreSQL that you can't start,
but without the header files :-( So we're back to compiling
PostgreSQL ourselves there.
----------------------------------------------------------------------
Comment By: Gerhard Häring (ghaering)
Date: 2002-10-19 14:42
Message:
Logged In: YES
user_id=163326
Billy, you do have access to an Alpha box :-) A Debian
3.0/Alpha box that you can access by logging in with ssh at
cf.sf.net (or compilefarm.sourceforge.net). This way, you
also have access to Sun Solaris, Mac OS X/Server and a few
other boxes.
This box even has Pyhton 2.1.3 and PostgreSQL installed.
The only problem is how to access the db server on this
machine :-( If nothing else helps, I believe PostgreSQL can
be started under a normal user account (with a different
pg_hba.conf, data directory and port, right?)
----------------------------------------------------------------------
Comment By: Alexander Meisel (alex)
Date: 2002-10-19 12:35
Message:
Logged In: YES
user_id=617
Hmm .... I sorry, I didn't find the FAQ in the first place.
But with regards to the Boolean constructor I can arrange a
login for you on the box (Will send you the details via E-Mail).
Thx
Alex
----------------------------------------------------------------------
Comment By: Billy G. Allie (ballie01)
Date: 2002-10-19 02:08
Message:
Logged In: YES
user_id=8500
In regards to the rowcount problem, it is not a problem.
Please see our FAQ at
http://pypgsql.sourceforge.net/pypgsql-faq.html#id2781273
I will look into the testcase to see if I can figure out the
problem with the Boolean constructor. Be warned that I do
not have access to an alpha box, so I may not find out
anything :-(
Bill Allie
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=116528&aid=625121&group_id=16528
|