mirror of
https://github.com/postgres/postgres.git
synced 2025-08-15 14:02:29 +03:00
Update to PyGreSQL 3.1:
Fix some quoting functions. In particular handle NULLs better. Use a method to add primary key information rather than direct manipulation of the class structures. Break decimal out in _quote (in pg.py) and treat it as float. Treat timestamp like date for quoting purposes. Remove a redundant SELECT from the get method speeding it, and insert since it calls get, up a little. Add test for BOOL type in typecast method to pgdbTypeCache class. (tv@beamnet.de) Fix pgdb.py to send port as integer to lower level function (dildog@l0pht.com) Change pg.py to speed up some operations Allow updates on tables with no primary keys. D'Arcy J.M. Cain
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
#define CASHOID 790
|
||||
|
||||
static PyObject *PGError;
|
||||
static const char *PyPgVersion = "3.0";
|
||||
static const char *PyPgVersion = "3.1";
|
||||
|
||||
/* taken from fileobject.c */
|
||||
#define BUF(v) PyString_AS_STRING((PyStringObject *)(v))
|
||||
@@ -1502,7 +1502,7 @@ pgconnect(pgobject *self, PyObject *args, PyObject *dict)
|
||||
|
||||
if (pgport != -1)
|
||||
{
|
||||
bzero(port_buffer, sizeof(port_buffer));
|
||||
memset(port_buffer, 0, sizeof(port_buffer));
|
||||
sprintf(port_buffer, "%d", pgport);
|
||||
npgobj->cnx = PQsetdbLogin(pghost, port_buffer, pgopt, pgtty, pgdbname,
|
||||
pguser, pgpasswd);
|
||||
@@ -2976,8 +2976,7 @@ pgsetdefpasswd(PyObject * self, PyObject *args)
|
||||
if (!PyArg_ParseTuple(args, "z", &temp))
|
||||
{
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"set_defpasswd(password), with password (string/
|
||||
None).");
|
||||
"set_defpasswd(password), with password (string/None).");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user