|
From: Billy G. A. <bal...@us...> - 2001-09-16 17:54:55
|
Update of /cvsroot/pypgsql/pypgsql
In directory usw-pr-cvs1:/tmp/cvs-serv2947
Modified Files:
libpqmodule.c libpqmodule.h pgconnection.c pgresult.c
Log Message:
15SEP2001 bga Dropped support for PostgreSQL prior to version 7.0.
Index: libpqmodule.c
===================================================================
RCS file: /cvsroot/pypgsql/pypgsql/libpqmodule.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** libpqmodule.c 2001/09/06 04:59:26 1.13
--- libpqmodule.c 2001/09/16 17:54:52 1.14
***************
*** 32,35 ****
--- 32,37 ----
| Date Ini Description |
| --------- --- ------------------------------------------------------- |
+ | 14SEP2001 bga Removed code related to PostgreSQL 6.5.x. We now only |
+ | support PostgreSQL 7.0 and later. |
| 02SEP2001 bga Changed 'long long' to 'LONG_LONG'. That way there is |
| no assumption of how a 64bit integer is declared. |
***************
*** 610,614 ****
/*-----------------------------------------------------------------------*/
- #if !defined(PGSQL_6X)
PyDict_SetItemString(d, "POLLING_FAILED",
Py_BuildValue("i", PGRES_POLLING_FAILED));
--- 612,615 ----
***************
*** 621,625 ****
PyDict_SetItemString(d, "POLLING_ACTIVE",
Py_BuildValue("i", PGRES_POLLING_ACTIVE));
- #endif
PyDict_SetItemString(d, "EMPTY_QUERY",
Py_BuildValue("i", PGRES_EMPTY_QUERY));
--- 622,625 ----
Index: libpqmodule.h
===================================================================
RCS file: /cvsroot/pypgsql/pypgsql/libpqmodule.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** libpqmodule.h 2001/09/04 02:28:24 1.5
--- libpqmodule.h 2001/09/16 17:54:52 1.6
***************
*** 70,74 ****
\***********************************************************************/
! #if defined(WITH_THREAD) && !defined(PGSQL_6X)
# define Pg_BEGIN_ALLOW_THREADS(cnx) \
{ \
--- 70,74 ----
\***********************************************************************/
! #if defined(WITH_THREAD)
# define Pg_BEGIN_ALLOW_THREADS(cnx) \
{ \
Index: pgconnection.c
===================================================================
RCS file: /cvsroot/pypgsql/pypgsql/pgconnection.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** pgconnection.c 2001/09/03 00:35:46 1.3
--- pgconnection.c 2001/09/16 17:54:52 1.4
***************
*** 29,32 ****
--- 29,34 ----
| Date Ini Description |
| --------- --- ------------------------------------------------------- |
+ | 14SEP2001 bga Removed code related to PostgreSQL 6.5.x. We now only |
+ | support PostgreSQL 7.0 and later. |
| 02SEP2001 bga Modified pgFixEsc so that any escaped sequence (\xHH) |
| whose value is greater than 127 is replaced by the |
***************
*** 105,111 ****
{
s[2] = (v & 7) + '0';
! v /= 8;
s[1] = (v & 7) + '0';
! v /= 8;
s[0] = (v & 7) + '0';
s += 3;
--- 107,113 ----
{
s[2] = (v & 7) + '0';
! v >>= 3;
s[1] = (v & 7) + '0';
! v >>= 3;
s[0] = (v & 7) + '0';
s += 3;
***************
*** 215,220 ****
char buf[100];
! (void)sprintf(buf, "<PgConnection instance at %p: %s>", (void *)self,
! (self->conn ? "OPENED" : "CLOSED"));
return Py_BuildValue("s", buf);
}
--- 217,222 ----
char buf[100];
! (void)sprintf(buf, "<%s PgConnection at %p>",
! (self->conn ? "Opened" : "Closed"), (void *)self);
return Py_BuildValue("s", buf);
}
***************
*** 273,277 ****
}
! return(t);
}
--- 275,279 ----
}
! return (t);
}
***************
*** 335,342 ****
/*--------------------------------------------------------------------------*/
- #if !defined(PGSQL_6X)
static char libPQsetnonblocking_Doc[] =
! "setnonblocking(onOff) -- Make the connection non-blocking if 'onOff' is TRUE,\n"
! "\t\t\t otherwise make the connection blocking.\n";
static PyObject *libPQsetnonblocking(PgConnection *self, PyObject *args)
--- 337,343 ----
/*--------------------------------------------------------------------------*/
static char libPQsetnonblocking_Doc[] =
! "setnonblocking(onOff) -- Make the connection non-blocking if 'onOff' is "
! "TRUE,\n\t\t\t otherwise make the connection blocking.\n";
static PyObject *libPQsetnonblocking(PgConnection *self, PyObject *args)
***************
*** 362,366 ****
return Py_None;
}
- #endif
/*--------------------------------------------------------------------------*/
--- 363,366 ----
***************
*** 470,474 ****
/*--------------------------------------------------------------------------*/
- #if !defined(PGSQL_6X)
static char libPQflush_Doc[] =
"flush() -- Attempt to flush any data queued on the backend.";
--- 470,473 ----
***************
*** 496,504 ****
return Py_None;
}
- #endif
/*--------------------------------------------------------------------------*/
- #if !defined(PGSQL_6X)
static char libPQconnectPoll_Doc[] =
"PQconnectPoll(PgConnection) -> Integer\n"
--- 495,501 ----
***************
*** 519,523 ****
return Py_BuildValue("i", PQconnectPoll(PgConnection_Get(self)));
}
- #endif
/*--------------------------------------------------------------------------*/
--- 516,519 ----
***************
*** 986,995 ****
{"trace", (PyCFunction)libPQtrace, 1, libPQtrace_Doc},
{"untrace", (PyCFunction)libPQuntrace, 1, libPQuntrace_Doc},
- #if !defined(PGSQL_6X)
{"connectPoll", (PyCFunction)libPQconnectPoll, 1, libPQconnectPoll_Doc},
{"flush", (PyCFunction)libPQflush, 1, libPQflush_Doc},
{"setnonblocking", (PyCFunction)libPQsetnonblocking, 1,
libPQsetnonblocking_Doc},
- #endif
{ NULL, NULL }
};
--- 982,989 ----
***************
*** 1011,1017 ****
{ "isBusy", T_INT, 0, RO },
{ "socket", T_OBJECT, CoOFF(socket), RO },
- #if !defined(PGSQL_6X)
{ "isnonblocking", T_INT, 0, RO },
- #endif
{ "notices", T_OBJECT, CoOFF(notices), RO },
{ "version", T_OBJECT, CoOFF(version), RO },
--- 1005,1009 ----
***************
*** 1056,1063 ****
return Py_BuildValue("i", PQisBusy(cnx));
- #if !defined(PGSQL_6X)
if (!strcmp(attr, "isnonblocking"))
return Py_BuildValue("i", PQisnonblocking(cnx));
- #endif
if (!strcmp(attr, "__module__"))
--- 1048,1053 ----
Index: pgresult.c
===================================================================
RCS file: /cvsroot/pypgsql/pypgsql/pgresult.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** pgresult.c 2001/09/06 04:42:21 1.8
--- pgresult.c 2001/09/16 17:54:52 1.9
***************
*** 29,32 ****
--- 29,34 ----
| Date Ini Description |
| --------- --- ------------------------------------------------------- |
+ | 14SEP2001 bga Removed code related to PostgreSQL 6.5.x. We now only |
+ | support PostgreSQL 7.0 and later. |
| 06SEP2001 bga Fixed a gcc reported int format <-> long int arguement |
| mis-match. |
***************
*** 139,143 ****
else
self->ctuples = Py_BuildValue("l", strtol(m, NULL, 10));
- #if !defined(PGSQL_6X)
o = PQoidValue(res);
if (o == InvalidOid)
--- 141,144 ----
***************
*** 148,152 ****
else
self->oidval = Py_BuildValue("l", (long)o);
- #endif
}
--- 149,152 ----
***************
*** 170,176 ****
Py_XDECREF(self->cstatus);
Py_XDECREF(self->ctuples);
- #if !defined(PGSQL_6X)
Py_XDECREF(self->oidval);
- #endif
PyObject_Del((PyObject *)self);
--- 170,174 ----
***************
*** 741,747 ****
{ "cmdStatus", T_OBJECT, RsOFF(cstatus), RO },
{ "cmdTuples", T_OBJECT, RsOFF(ctuples), RO },
- #if !defined(PGSQL_6X)
{ "oidValue", T_OBJECT, RsOFF(oidval), RO },
- #endif
{ NULL }
};
--- 739,743 ----
|