summaryrefslogtreecommitdiff
path: root/src/interfaces/python/pgmodule.c
AgeCommit message (Collapse)Author
2003-08-01remove python module, as its moved to http://www.pygresql.orgMarc G. Fournier
2003-04-25Use closesocket() for all socket/pipe closing, because Win32 requiresBruce Momjian
it, and map that to close() on Unix.
2003-03-25Use PQfreemem() consistently, and document its use for Notify.Bruce Momjian
Keep PQfreeNotify() around for binary compatibility.
2003-03-10This patch fixes a bunch of spelling mistakes in comments throughout theTom Lane
PostgreSQL source code. Neil Conway
2002-12-10Add an unnecessary assignment to remove a bogus warning. I checked theD'Arcy J.M. Cain
logic carefully and I am sure that the test against n happens after it is assigned to.
2002-12-06PyGreSQL inserttable patchBruce Momjian
===================== 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-09-04pgindent run.Bruce Momjian
2002-08-28This is a quick patch to fix a crash in pgquery_dictresult() introducedBruce Momjian
recently. I just ran into it while running a set of python test scripts, and I'm not sure who the normal maintainer is for interfaces/python. John Nield
2002-08-15http://archives.postgresql.org/pgsql-bugs/2002-06/msg00086.php and neverBruce Momjian
saw a fix offered up. Since I'm gearing up to use Postgres and Python soon, I figured I'd have a hand at trying to get this sucker addressed. Apologies if this has already been plugged. I looked in the archives and never saw a response. At any rate, I must admit I don't think I fully understand the implications of some of the changes I made even though they appear to be straight forward. We all know the devil is in the details. Anyone more knowledgeable is requested to review my changes. :( I also updated the advanced.py script in a somewhat nonsensical fashion to make use of an int8 field in an effort to test this change. It seems to run okay, however, this is by no means an all exhaustive test. So, it's possible that a bumpy road may lay ahead for some. On the other hand...overflows (hopefully) previously lurked (long -> int conversion). Greg Copeland
2002-03-29Fox for old python PyMem_DEL, was PyMem_Del,Bruce Momjian
2002-03-29Fix '#' commant to be proper C comment.Bruce Momjian
2002-03-26Further changes following discussion on INTERFACES mailing list:D'Arcy J.M. Cain
- Use PyObject_Del() rather than macro version - Check version and drop back to PyMem_Del() for older systems.
2002-03-20PyGreSQL causes a segfault when used with a Python executable that wasD'Arcy J.M. Cain
compiled with --with-pymalloc. This change fixes that. Thanks to Dave Wallace <[email protected]>
2002-03-05Back out python patch:Bruce Momjian
Elliot Lee wrote: > This patch to the python bindings adds C versions of the often-used query > args quoting routines, as well as support for quoting lists e.g. > dbc.execute("SELECT * FROM foo WHERE blah IN %s", ([1,2,3],))
2002-03-05This patch to the python bindings adds C versions of the often-usedBruce Momjian
query args quoting routines, as well as support for quoting lists e.g. dbc.execute("SELECT * FROM foo WHERE blah IN %s", ([1,2,3],)) Elliot Lee
2001-12-03Bump version to 3.3. Mostly this is because there is some confusion aboutD'Arcy J.M. Cain
the latest version and I wanted to make sure that there was a clean release. I also change the build files as I discussed in my letter of Nov 6, 2001. At the time I was asked to hold off until after the release.
2001-11-05New pgindent run with fixes suggested by Tom. Patch manually reviewed,Bruce Momjian
initdb/regression tests pass.
2001-11-04Version was 3.3 but last released version was 3.1. Setting to match restD'Arcy J.M. Cain
of the documentation in preparation for upcoming release.
2001-10-28Another pgindent run. Fixes enum indenting, and improves #endifBruce Momjian
spacing. Also adds space for one-line comments.
2001-10-25pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian
tests pass.
2001-10-19> This stops the interface from leaking the row tuples (and thus theBruce Momjian
> results of every fetch). Stephen Robert Norris
2001-10-16Python handle as string all int8 values from postgresql. This could beBruce Momjian
view when using the aggregate function count() and function nextval that returns an int8 value, but in python is represented like string: >> db.query("select nextval('my_seq')").getresult() [('2',)] >> db.query("select count(*) from films").dictresult() [{'count': '120'}] Ricardo Caesar Lenzi
2001-09-19Change the version. We are moving towards the next release.D'Arcy J.M. Cain
Fixed a nasty bug that messed up negative money amounts.
2001-08-16This patch fixes the well-known but unfixed bug that fetchone() always returnsBruce Momjian
the first result in the DB-API compliant wrapper. It turned out that the bug was way down in the C code. Gerhard Häring
2001-07-11Add prototypes to supress warnings.Bruce Momjian
2001-06-22Include catalog/pg_type.h instead of manually extracting the interestingPeter Eisentraut
oid values.
2001-06-20Make sure that everything says version 3.2.D'Arcy J.M. Cain
2001-05-27Add NUMERICOID return type. Treat it as floating point for now. ThisD'Arcy J.M. Cain
could be changed if we create a new Python type that matches it better but NUMERIC <==> FLOAT probably works fine for most cases.
2001-05-25While changing Cygwin Python to build its core as a DLL (like Win32Bruce Momjian
Python) to support shared extension modules, I have learned that Guido prefers the style of the attached patch to solve the above problem. I feel that this solution is particularly appropriate in this case because the following: PglargeType PgType PgQueryType are already being handled in the way that I am proposing for PgSourceType. Jason Tishler
2001-05-02Change "|zzlzzzz" argument specification to "|zzizzzz" so that the code worksD'Arcy J.M. Cain
properly on 64 bit systems. Change submitted by Marc Poinot ([email protected])
2001-03-22pgindent run. Make it all clean.Bruce Momjian
2001-03-15Add WIN32 support.D'Arcy J.M. Cain
2001-03-03Added postgres.h header for more type checking.D'Arcy J.M. Cain
Changed the way that OID is retrieved on inserts. PQoidStatus appears to be deprecated so I am using PQoidValue instead.
2000-11-10Update to PyGreSQL 3.1:Bruce Momjian
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. ([email protected]) Fix pgdb.py to send port as integer to lower level function ([email protected]) Change pg.py to speed up some operations Allow updates on tables with no primary keys. D'Arcy J.M. Cain
2000-10-02Update for PyGreSQL 3.0, from D'Arcy J.M. CainBruce Momjian
2000-06-10Moved the intricacies of the perl interface build into its own makefilePeter Eisentraut
that now functions as a wrapper around the MakeMaker stuff. It might even behave sensically when we have separate build dirs. Same for plperl, which of course still doesn't work very well. Made sure that plperl respects the choice of --libdir. Added --with-python to automatically build and install the Python interface. Works similarly to the Perl5 stuff. Moved the burden of the distclean targets lower down into the source tree. Eventually, each make file should have its own. Added automatic remaking of makefiles and configure. Currently only for the top-level because of a bug(?) in Autoconf. Use GNU `missing' to work around missing autoconf and aclocal. Start factoring out macros into their own config/*.m4 files to increase readability and organization.
2000-05-29Cleanup of <> and ""Bruce Momjian
1999-05-28Update pygresql version stamp.Bruce Momjian
1999-05-25pgindent run over code.Bruce Momjian
1999-05-19Bring python up to date ...Marc G. Fournier
From: D'Arcy J.M. Cain <[email protected]>
1999-05-17Re-add python.Bruce Momjian
1999-05-10Update to PyGreSQL 2.3.Bruce Momjian
1999-05-03here are some patches for 6.5.0 which I already submitted but have neverBruce Momjian
been applied. The patches are in the .tar.gz attachment at the end: varchar-array.patch this patch adds support for arrays of bpchar() and varchar(), which where always missing from postgres. These datatypes can be used to replace the _char4, _char8, etc., which were dropped some time ago. block-size.patch this patch fixes many errors in the parser and other program which happen with very large query statements (> 8K) when using a page size larger than 8192. This patch is needed if you want to submit queries larger than 8K. Postgres supports tuples up to 32K but you can't insert them because you can't submit queries larger than 8K. My patch fixes this problem. The patch also replaces all the occurrences of `8192' and `1<<13' in the sources with the proper constants defined in include files. You should now never find 8192 hardwired in C code, just to make code clearer. -- Massimo Dal Zotto
1998-12-17Upgrade to Pygress 2.2.Bruce Momjian
1998-09-01OK, folks, here is the pgindent output.Bruce Momjian
1998-02-26pgindent run before 6.3 release, with Thomas' requested changes.Bruce Momjian
1998-01-25Merge in D'Arcy Cain's python interface (PyGreSQL 2.0)Marc G. Fournier