Share

Python Interface to PostgreSQL

Code

Programming Languages: C, Python

License: Python License (CNRI Python License)

Repositories

browse code, statistics, last commit on 2006-06-07 cvs -d:pserver:anonymous@pypgsql.cvs.sourceforge.net:/cvsroot/pypgsql login

cvs -z3 -d:pserver:anonymous@pypgsql.cvs.sourceforge.net:/cvsroot/pypgsql co -P modulename

Show:

What's happening?

  • PgConnection.flush fails to handle nonblocking writes

    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

  • web frontpage refers to discontinued KRUD distro

    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

  • PgVersion checks too restrictive

    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

  • setup.py needs secur32.lib for win32

    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

  • fix for PgBytea quote uses PQespcaeByteaConn

    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

  • callproc result set not retrievable

    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

  • wrong indentation (aka unknown PEP 8)

    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

  • Unicode value can't be converted?

    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

  • Comment: PgNumeric += is strange

    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

    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

Our Numbers