-
PgConnection.flush appears to misunderstand how to use the underlying PQflush function. When PQflush returns 1, this is not an error. The 1 should be returned to the caller of PgConnection.flush, so the caller knows whether to call flush again.
1 means "call again when the socket is writable."
0 means "no more data to write".
-1 means error, and only in this case should...
2009-11-13 19:15:27 UTC by edwardfaulkner
-
The frontpage at http://pypgsql.sourceforge.net/
says
"pyPgSQL is available as a Redhat RPM as part of the KRUD distribution that builds on Redhat. These RPMs are now also available for downloading at the project page."
However KRUD was discontinued in 2006.
http://distrowatch.com/table.php?distribution=krud
http://www.tummy.com/Products/krud/ (dated 2005)
A good hint on usual RPM...
2009-07-01 15:26:38 UTC by guidod
-
I was able to compile libpq for PG-8.3 on Vista, and build pyPgSQL-2.5.1.
Then I got:
File "c:\Python25\lib\site-packages\pyPgSQL\PgSQL.py", line 2210, in connect
return Connection(connInfo, client_encoding, unicode_results)
File "c:\Python25\lib\site-packages\pyPgSQL\PgSQL.py", line 2365, in __init__
raise DatabaseError, m
libpq.DatabaseError: Invalid format for PgVersion...
2009-01-15 04:00:10 UTC by aminusfu
-
I compiled a new libpq from postgresql-8.3.5 today on Vista, and then received the following error while trying to build pyPgSQL against it:
C:\download\Python\pyPgSQL-2.5.1>python setup.py build
...
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\download\Postgres\postgresql-8.3.5\src\interfaces\libpq\Release /LIBPATH:C:\Python26\libs...
2009-01-14 21:48:54 UTC by aminusfu
-
PgBytes quote the value using internal implementation.
But. The bytea escaping make different by connection property. and PostgreSQL 8.3.1 make some modify on escaping bytea escaping method
In release note 8.3.1
"Make encode(bytea, 'escape') convert all high-bit-set byte values into \nnn octal escape sequences (Tom) "
Becase of above thing. current implementation was make some error...
2008-04-10 04:53:29 UTC by whitekid
-
The Cursor.callproc method in pyPgSQL (at least up to version 1.5) has two problems. First, it takes *args instead of a single args parameter, which is contrary to the DBAPI spec and most other implementations of it. Second, it calls 'select proc(args)', which does not allow fetchall() to retrieve its return value. Therefore, this patches pyPgSQL.Cursor.callproc to take a single args param, and...
2008-03-24 22:00:41 UTC by aminusfu
-
From PEP 8 - Style guide:
Indentation
Use 4 spaces per indentation level.
For really old code that you don't want to mess up, you can continue to
use 8-space tabs.
Tabs or Spaces?
Never mix tabs and spaces.
The most popular way of indenting Python is with spaces only. The
second-most popular way is with tabs only. Code indented with a mixture...
2008-03-11 09:37:23 UTC by bpietro2
-
All versions of PgSQL (including last one, 2.5.1) have this omission:
Unlike StringType, UnicodeType can't be converted to PgNumeric; see example:
>>> from pyPgSQL import PgSQL
>>> a = '10.1'
>>> b = PgSQL.PgNumeric(a)
>>> b
>>> c = u'10.1'
>>> d = PgSQL.PgNumeric(c)
Traceback (most recent call last):
File "", line...
2008-03-11 09:14:20 UTC by bpietro2
-
IMHO you are right, it's worse, this bug affects not only '+='. See this:
>>> ZERO = PgSQL.PgNumeric('0')
>>> a = ZERO; b = ZERO; b = b + 1; c = ZERO
>>> print ZERO,a,b,c
0 0 1 0
>>> a = ZERO; b = ZERO; b += 1; c = ZERO
>>> print ZERO,a,b,c
1 1 1 1
>>> ZERO = PgSQL.PgNumeric('0')
>>> a = ZERO; b = ZERO; b = b - 1; c = ZERO
>>> print ZERO,a,b,c
0 0 -1 0
>>> a = ZERO; b = ZERO; b -=...
2008-03-09 14:40:06 UTC by bpietro2
-
Typo in pyPgSQL/PgSQL.py, line 999, causes this error:
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/pyPgSQL/test.py", line 5, in
res = cur.fetchall()
File "/usr/lib/python2.5/site-packages/pyPgSQL/PgSQL.py", line 3247, in fetchall
_list.append(self.__fetchOneRow())
File "/usr/lib/python2.5/site-packages/pyPgSQL/PgSQL.py", line 2814, in...
2007-12-19 14:26:03 UTC by dktrkranz