There is a problem if you´re using pypgsql with an new
postgresql database like 7.4beta1. You have
errormessages like:
>db = PgSQL.connect("skesrv00:5500:postgres:postgres")
>Exception
>Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File
"/usr/lib/python2.2/site-packages/pyPgSQL/PgSQL.py",
line 2211, in connect
> return Connection(connInfo, client_encoding,
unicode_results)
> File
"/usr/lib/python2.2/site-packages/pyPgSQL/PgSQL.py",
line 2331, in __init__
> print PQconnectdb(connInfo)
>ValueError: Ivalid format for PgVersion construction.
In this case you must add a simple workaround to the
file pgversion.c (near line 320):
token = pg_strtok_r((char *)NULL, ".", &save_ptr);
/* <workaround> */
/* simple workaround for a token like "4beta1" */
if (!isdigit(token[1])) token[1]=0x0;
/* <\workaround> */
if ((token != (char *)NULL) && (*token != '\0') &&
Then
setup.py build
setup.py install
Logged In: YES
user_id=8500
A fix for this bug has been commited into the CVS repository.