summaryrefslogtreecommitdiff
path: root/src/interfaces/python
AgeCommit message (Collapse)Author
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-15This fixes some text as well as enforces the use of "drop table cascade"Bruce Momjian
since we moved from an implicate to explicate implementation. Greg Copeland
2002-08-15Well, that certainly appeared to be very straight forward. pg.py andBruce Momjian
syscat.py scripts were both modified. pg.py uses it to cache a list of pks (which is seemingly does for every db connection) and various attributes. syscat uses it to walk the list of system tables and queries the various attributes from these tables. In both cases, it seemingly makes sense to apply what you've requested. Greg Copeland
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-06-03Small patch to correct the default arraysize associatedBruce Momjian
with the Cursor object's fetchmany() method. The API and inline documentation state that the default is 1. It currently defaults to 5. Patrick Macdonald
2002-05-03Fix typo in usage instructions.Tom Lane
2002-05-03Remove the last traces of datatypes datetime and timespan.Tom Lane
2002-04-24pgdb.connect() seems to be broken on Python 2.0.1 (which ships withBruce Momjian
Slackware 8), and perhaps on other Pythons, haven't checked. Something in the _pg.connect() call isn't working. I think the problem stems from the fact that 'host' is a named parameter of both _pg.connect and pgdb.connect, and so Python treats it as a variable assignment, not a named parameter. Uses non-named parameters. Andrew Johnson
2002-04-18Back out python change, needs delay.Bruce Momjian
2002-04-18Change docs to do 20! rather than larger.Bruce Momjian
2002-04-11Restructure representation of aggregate functions so that they have pg_procTom Lane
entries, per pghackers discussion. This fixes aggregates to live in namespaces, and also simplifies/speeds up lookup in parse_func.c. Also, add a 'proimplicit' flag to pg_proc that controls whether a type coercion function may be invoked implicitly, or only explicitly. The current settings of these flags are more permissive than I would like, but we will need to debate and refine the behavior; for now, I avoided breaking regression tests as much as I could.
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 <dwallace@udel.edu>
2002-03-19Bump version number to match tree.D'Arcy J.M. Cain
2002-03-19Fix name in comments and add info about this module's place in PyGreSQL.D'Arcy J.M. Cain
2002-03-19> I am backing out this patch. Please resubmit with this corrected. Thanks.Bruce Momjian
> > I am running Python 1.5. Therein lies the problem... :) Since it appears you have the requirement of supporting old python versions, attached is just the pgdb.py part of the patch (with a fix for DateTime handling). It has the same functionality but certainly won't be quite as fast. Given the absence of _PyString_Join in python1.5, it's a pain to get the C variants working for all versions. The pgdb.py patch does leaves the hooks in, should someone wish to do the optimization at a later point. Elliot Lee
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-13revert last changePeter Eisentraut
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-19A bunch of small doco updates motivated by scanning the comments onTom Lane
the interactive docs.
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-11-04Note that PyGreSQL has been checked against Python 2.1 now.D'Arcy J.M. Cain
2001-11-04The "%d", while syntactically correct, was confusing. Added a space toD'Arcy J.M. Cain
make it clearer that d was the argument to the format operator.
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-09-10Remove INV_ARCHIVE mention in python readme.Bruce Momjian
2001-08-24Rename config.h to pg_config.h and os.h to pg_config_os.h, fix a number ofPeter Eisentraut
places that were including the wrong files.
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-07-10Support fake root install, separate build dir, dependency tracking, ourPeter Eisentraut
choice of compiler and flags, uninstall, and peculiar Python installation layouts for PyGreSql. Also install into site-packages now, as officially recommended. And pgdb.py is also installed now, used to be forgotten.
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-06-20Add NUMERICOID to this script. This script can be run occasionally toD'Arcy J.M. Cain
make sure that we are using the right #defines in pgmodule.c but the OIDs are never actually expected to change.
2001-06-15Add bpchar to list of string types.D'Arcy J.M. Cain
Thanks to Steve McClure <smcclure@racemi.com> for the patch.
2001-05-30Add missing comma.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-25Back out, per Peter E.Bruce Momjian
> > The attached patch changes src/interfaces/python/GNUmakefile to use the > > value of DESTDIR like the rest (or at least most) of the PostgreSQL > > makefiles. I found this problem when trying to package a pre-built > > Cygwin PostgreSQL distribution, but this problem is platform independent.
2001-05-25The attached patch changes src/interfaces/python/GNUmakefile to use theBruce Momjian
value of DESTDIR like the rest (or at least most) of the PostgreSQL makefiles. I found this problem when trying to package a pre-built Cygwin PostgreSQL distribution, but this problem is platform independent. The problem manifests itself when one tries to install into a stagging area (e.g., to build a tarball) instead of a real install. In this case, pg.py and _pgmodule$(SO) still end up being installed in the configured prefix directory ignoring the value of DESTDIR. Unfortunately, this patch does not handle the case where PostgreSQL and Python are configured with different prefixes. Since the Python Makefile is automatically generated and does not use DESTDIR, I believe that this issue will be difficult to correct. If anyone has ideas on how to fix this issue, then I'm quite willing to rework the patch to take the suggestion into account. Jason Tishler
2001-05-15Fix small thinko.D'Arcy J.M. Cain
2001-05-12PL/Python should build portably now, if you can get over the fact thatPeter Eisentraut
there's no shared libpython. Test suite works as well. Also, add some documentation.
2001-05-02Add note explaining why inserts take longer as tables grow. Also suggestD'Arcy J.M. Cain
the way to handle this.
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 (Marc.Poinot@onera.fr)