aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/python
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2003-04-25 01:24:00 +0000
committerBruce Momjian <bruce@momjian.us>2003-04-25 01:24:00 +0000
commitdb7e46a76dc5ea8f15ed0ca67cc232b5ea38938d (patch)
treee5267da20e29b26b95ba0dcf04ce1b5809d394d1 /src/interfaces/python
parent5f677af2da8ca15516758a5b6c3af8565785977d (diff)
downloadpostgresql-db7e46a76dc5ea8f15ed0ca67cc232b5ea38938d.tar.gz
postgresql-db7e46a76dc5ea8f15ed0ca67cc232b5ea38938d.zip
Use closesocket() for all socket/pipe closing, because Win32 requires
it, and map that to close() on Unix.
Diffstat (limited to 'src/interfaces/python')
-rw-r--r--src/interfaces/python/pgmodule.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/interfaces/python/pgmodule.c b/src/interfaces/python/pgmodule.c
index b659c99759e..2e81e1c51a5 100644
--- a/src/interfaces/python/pgmodule.c
+++ b/src/interfaces/python/pgmodule.c
@@ -2405,10 +2405,10 @@ pg_inserttable(pgobject * self, PyObject * args)
n = j; /* never used before this assignment */
}
if (n)
- {
+ {
/* allocate buffer */
if (!(buffer = malloc(MAX_BUFFER_SIZE)))
- {
+ {
PyErr_SetString(PyExc_MemoryError,
"can't allocate insert buffer.");
return NULL;
@@ -2438,7 +2438,7 @@ pg_inserttable(pgobject * self, PyObject * args)
getsubitem = PyTuple_GetItem;
else
getsubitem = PyList_GetItem;
-
+
/* builds insert line */
bufpt=buffer;
bufsiz = MAX_BUFFER_SIZE - 1;
@@ -2527,7 +2527,7 @@ pg_inserttable(pgobject * self, PyObject * args)
{
*bufpt++ = '\t'; --bufsiz;
}
-
+
if (bufsiz <= 0)
{
free(buffer);
@@ -2543,7 +2543,7 @@ pg_inserttable(pgobject * self, PyObject * args)
/* sends data */
PQputline(self->cnx, buffer);
}
-
+
/* ends query */
PQputline(self->cnx, "\\.\n");
PQendcopy(self->cnx);