From: <vze...@ve...> - 2002-11-20 16:23:21
|
Can anyone tell me how to programatically check the value of a PgBoolean object? I am doing the following: ##### from pyPgSQL import PgSQL from pyPgSQL import libpq db = PgSQL.connect("localhost::testdb") cursor = db.cursor() cursor.callproc("sp_TestBoolean", 1, 1) retval = cursor.fetchone() ##### When I print the value of retval, I get this: [<PgBoolean instance at 0x401c8900: Value: False>] I would like to be able to do something like this: if retval == true: # do something else: # do something else Thanks in advance for your help. |