summaryrefslogtreecommitdiff
path: root/src/pl/plpython/plpython.c
AgeCommit message (Collapse)Author
2004-01-07More janitorial work: remove the explicit casting of NULL literals to aNeil Conway
pointer type when it is not necessary to do so. For future reference, casting NULL to a pointer type is only necessary when (a) invoking a function AND either (b) the function has no prototype OR (c) the function is a varargs function.
2004-01-06Apply the core parts of Dennis Bjorklund's patch to allow functionTom Lane
parameters to be declared with names. pg_proc has a column to store names, and CREATE FUNCTION can insert data into it, but that's all as yet. I need to do more work on the pg_dump and plpgsql portions of the patch before committing those, but I thought I'd get the bulky changes in before the tree drifts under me. initdb forced due to pg_proc change.
2004-01-04Remove trailing semicolons from macro initializations in plpython.Bruce Momjian
Problem report on True64 Unix by Nikola Milutinovic.
2003-11-29$Header: -> $PostgreSQL Changes ...PostgreSQL Daemon
2003-09-16Fix some problems with dropped columns in plpython trigger functions.Tom Lane
2003-09-14Fix plpython to generate separate cached procedure data for eachTom Lane
relation, when the same function is used as a trigger on more than one relation. This avoids crashes due to differing rowtypes for different relations. Per bug report from Lance Thomas, 7-Feb-03.
2003-08-04Fix pltcl and plpython to support STATEMENT triggers.Tom Lane
Joe Conway
2003-08-04Put back braces removed by pgindent (not really pgindent's fault).Tom Lane
2003-08-04pgindent run.Bruce Momjian
2003-07-31Cause library-preload feature to report error if specified initializationTom Lane
function is not found. Also, make all the PL libraries have initialization functions with standard names. Patch from Joe Conway.
2003-07-25Error message editing in src/pl. The plpython module could use anotherTom Lane
look ... I'm not real certain which errors are strictly internal and which are likely to be provoked by users.
2003-06-25> I've worked with the Pl/Python code in the past and will see about removingBruce Momjian
> rexec and making it an untrusted language. Last time I looked, it didn't > look particularly difficult. I've set aside some time next week, so stay > tuned. Attached is a patch that removes all of the RExec code from plpython from the current PostgreSQL CVS. In addition, plpython needs to be changed to an untrusted language in createlang. Please let me know if there are any problems. Kevin Jacobs
2003-06-11Fix brain damage in deciding which python input converter to use.Tom Lane
2003-05-27Make debug_ GUC varables output DEBUG1 rather than LOG, and mention inBruce Momjian
docs that CLIENT/LOG_MIN_MESSAGES now controls debug_* output location. Doc changes included.
2003-03-10This patch fixes a bunch of spelling mistakes in comments throughout theTom Lane
PostgreSQL source code. Neil Conway
2003-02-13Repair incorrect indexing for atttypmod, per Brad McLean.Tom Lane
2003-01-31Make plpython's spi_execute interface handle NULLs properly.Tom Lane
From Andrew Bosma.
2003-01-31Clean up plpython error reporting so that its regression test passesTom Lane
with some amount of cleanliness. I see no need to report the internal Python name rather than the SQL procedure name in error tracebacks.
2002-11-22Fix a dozen or so places that were passing unpredictable data stringsTom Lane
as elog format strings. Hai-Chen Tu pointed out the problem in contrib/dbmirror, but it wasn't the only such error.
2002-10-19Fix within-function memory leaks in the various PLs' interfaces toTom Lane
SPI_prepare: they all save the prepared plan into topCxt, and so the procCxt copy that's actually returned by SPI_prepare ought to be freed. Diagnosis and plpython fix by Nigel Andrews, followup for other PLs by Tom Lane.
2002-10-14I have attached two patches as per:Bruce Momjian
1) pltcl: Add SPI_freetuptable() calls to avoid memory leaks (Me + Neil Conway) Change sprintf()s to snprintf()s (Neil Conway) Remove header files included elsewhere (Neil Conway) 2)plpython: Add SPI_freetuptable() calls to avoid memory leaks Cosemtic change to remove a compiler warning Notes: I have tested pltcl.c for a) the original leak problem reported for the repeated call of spi_exec in a TCL fragment and b) the subsequent report resulting from the use of spi_exec -array in a TCL fragment. The plpython.c patch is exactly the same as that applied to make revision 1.23, the plpython_schema.sql and feature.expected sections of the patch are also the same as last submited, applied and subsequently reversed out. It remains untested by me (other than via make check). However, this should be safe provided PyString_FromString() _copies_ the given string to make a PyObject. Nigel J. Andrews
2002-09-26Back out /pl memory leak patch. Wait for new version.Bruce Momjian
2002-09-26I have attached the pltcl patch again, just in case. For the sake of clarityBruce Momjian
let's say this patch superscedes the previous one. I have also attached a patch addressing the similar memory leak problem in plpython. This includes a slight adjustment of the tests in the source directory. The patch also includes a cosmetic change to remove a compiler warning although I think the change makes the code look worse though. BTW, by my reckoning the memory leak would occur with prepared plans and without. If that is not the case then I've been barking up the wrong tree. Nigel J. Andrews
2002-09-04Fix compile warning.Peter Eisentraut
2002-09-04pgindent run.Bruce Momjian
2002-08-22Add a bunch of pseudo-types to replace the behavior formerly associatedTom Lane
with OPAQUE, as per recent pghackers discussion. I still want to do some more work on the 'cstring' pseudo-type, but I'm going to commit the bulk of the changes now before the tree starts shifting under me ...
2002-07-20oid is needed, it is added at the end of the struct (after the nullBruce Momjian
bitmap, if present). Per Tom Lane's suggestion the information whether a tuple has an oid or not is carried in the tuple descriptor. For debugging reasons tdhasoid is of type char, not bool. There are predefined values for WITHOID, WITHOUTOID and UNDEFOID. This patch has been generated against a cvs snapshot from last week and I don't expect it to apply cleanly to current sources. While I post it here for public review, I'm working on a new version against a current snapshot. (There's been heavy activity recently; hope to catch up some day ...) This is a long patch; if it is too hard to swallow, I can provide it in smaller pieces: Part 1: Accessor macros Part 2: tdhasoid in TupDesc Part 3: Regression test Part 4: Parameter withoid to heap_addheader Part 5: Eliminate t_oid from HeapTupleHeader Part 2 is the most hairy part because of changes in the executor and even in the parser; the other parts are straightforward. Up to part 4 the patched postmaster stays binary compatible to databases created with an unpatched version. Part 5 is small (100 lines) and finally breaks compatibility. Manfred Koizar
2002-06-15This patch wraps all accesses to t_xmin, t_cmin, t_xmax, and t_cmax inBruce Momjian
HeapTupleHeaderData in setter and getter macros called HeapTupleHeaderGetXmin, HeapTupleHeaderSetXmin etc. It also introduces a "virtual" field xvac by defining HeapTupleHeaderGetXvac and HeapTupleHeaderSetXvac. Xvac is used by VACUUM, in fact it is stored in t_cmin. Manfred Koizar
2002-03-29pg_type has a typnamespace column; system now supports creating typesTom Lane
in different namespaces. Also, cleanup work on relation namespace support: drop, alter, rename commands work for tables in non-default namespaces.
2002-03-06Add new elog() levels to stored procedure languages. plperl DEBUG hackBruce Momjian
still needed because only removed in 7.4.
2002-03-06Change made to elog:Bruce Momjian
o Change all current CVS messages of NOTICE to WARNING. We were going to do this just before 7.3 beta but it has to be done now, as you will see below. o Change current INFO messages that should be controlled by client_min_messages to NOTICE. o Force remaining INFO messages, like from EXPLAIN, VACUUM VERBOSE, etc. to always go to the client. o Remove INFO from the client_min_messages options and add NOTICE. Seems we do need three non-ERROR elog levels to handle the various behaviors we need for these messages. Regression passed.
2002-03-02Commit to match discussed elog() changes. Only update is that LOG isBruce Momjian
now just below FATAL in server_min_messages. Added more text to highlight ordering difference between it and client_min_messages. --------------------------------------------------------------------------- REALLYFATAL => PANIC STOP => PANIC New INFO level the prints to client by default New LOG level the prints to server log by default Cause VACUUM information to print only to the client NOTICE => INFO where purely information messages are sent DEBUG => LOG for purely server status messages DEBUG removed, kept as backward compatible DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1 added DebugLvl removed in favor of new DEBUG[1-5] symbols New server_min_messages GUC parameter with values: DEBUG[5-1], INFO, NOTICE, ERROR, LOG, FATAL, PANIC New client_min_messages GUC parameter with values: DEBUG[5-1], LOG, INFO, NOTICE, ERROR, FATAL, PANIC Server startup now logged with LOG instead of DEBUG Remove debug_level GUC parameter elog() numbers now start at 10 Add test to print error message if older elog() values are passed to elog() Bootstrap mode now has a -d that requires an argument, like postmaster
2001-11-16plpython security and error handling fixes, fromTom Lane
Kevin Jacobs and Brad McLean.
2001-11-05New pgindent run with fixes suggested by Tom. Patch manually reviewed,Bruce Momjian
initdb/regression tests pass.
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-22Rebuild cached function definition after CREATE OR REPLACE FUNCTION.Tom Lane
Fix typlen-vs-typmod errors inherited from pltcl.
2001-10-06Rearrange fmgr.c and relcache so that it's possible to keep FmgrInfoTom Lane
lookup info in the relcache for index access method support functions. This makes a huge difference for dynamically loaded support functions, and should save a few cycles even for built-in ones. Also tweak dfmgr.c so that load_external_function is called only once, not twice, when doing fmgr_info for a dynamically loaded function. All per performance gripe from Teodor Sigaev, 5-Oct-01.
2001-10-04Using strtol() on int8 values (input parameters or result sets) inBruce Momjian
plpython would result in numeric overflows causing the backend to terminate abruptly. This patch fixes it. Bradley McLean
2001-10-01Fix a couple of stray // comments.Tom Lane
2001-09-12I noticed that plpython does not make the relid available insideBruce Momjian
a trigger the way that pltcl does. Here's a little patch that adds it in. -Brad McLean
2001-06-01pltcl, plperl, and plpython all suffer the same bug previously fixedTom Lane
in plpgsql: they fail for datatypes that have old-style I/O functions due to caching FmgrInfo structs with wrong fn_mcxt lifetime. Although the plpython fix seems straightforward, I can't check it here since I don't have Python installed --- would someone check it?
2001-05-25See attached for a small patch that enables plpython to build cleanlyBruce Momjian
under Cygwin. This patch together with my previous Python patch: http://postgresql.readysetnet.com/mhonarc/pgsql-patches/2001-05/msg00075.htm l enables full Python support (i.e., configure --with-python) for Cygwin PostgreSQL. Jason Tishler
2001-05-12PL/Python integration: support in create/droplang, add CVS keywords,Peter Eisentraut
remove useless files, beat some sense into Makefile. For me it builds and sort of runs, so it's a start.
2001-05-09Add plpython code.Bruce Momjian