postgresql/src
Bruce Momjian 36580c8e21 PyGreSQL inserttable patch
=====================

I suggested an improvement of the inserttable in the PyGreSQL interface
already in January, but seemingly it was never implemented. I was told this
is the right place to get patches in for PyGreSQL, so I'm reposting my patch
here.

I consider the inserttable methode essential in populating the database
because of its benefits in performance compared to insert, so I think this
patch is quite essential. The attachment is an improved version of the
corresponding pg_inserttable function in pgmodule.c, which fixes the
following problems:

* The function raised exceptions because PyList_GetItem was used beyond the
size of the list. This was checked by comparing the result with NULL, but
the exception was not cleaned up, which could result in mysterious errors in
the following Python code. Instead of clearing the exception using
PyErr_Clear or something like that, I avoided throwing the exception at all
by at first requesting the size of the list. Using this opportunity, I also
checked the uniformity of the size of the rows passed in the lists/tuples.
The function also accepts (and silently ignores) empty lists and sublists.
* Python "None" values are now accepted and properly converted to PostgreSQL
NULL values
* The function now generates an error message in case of a line buffer
overflow
* It copes with tabulators, newlines and backslashes in strings now
* Rewrote the buffer filling code which should now run faster by avoiding
unnecessary string copy operations forth and back

Christoph Zwerschke
2002-12-06 03:19:28 +00:00
..
backend As far as I figured from the source code this function only deals with 2002-12-05 23:21:07 +00:00
bin Fix pg_dump failure against 7.1 or older servers, per 2002-12-01 18:44:00 +00:00
corba
data
include Clearify variables names so it is clear which variable is the 2002-12-05 18:52:43 +00:00
interfaces PyGreSQL inserttable patch 2002-12-06 03:19:28 +00:00
makefiles There was an error in the gcc portion of the patch I sent you. Here is 2002-11-14 04:07:27 +00:00
pl Phase 1 of read-only-plans project: cause executor state nodes to point 2002-12-05 15:50:39 +00:00
port Update comments. 2002-10-29 04:24:30 +00:00
template
test Make usesysid consistently int4, not oid. 2002-12-04 05:18:38 +00:00
tools
tutorial
utils Re-add Win32 missing files, I think. 2002-11-02 02:00:35 +00:00
DEVELOPERS
Makefile
Makefile.global.in I am attaching a patch file that will replace the previous one. It only 2002-11-10 00:37:28 +00:00
Makefile.shlib
nls-global.mk
win32.mak