summaryrefslogtreecommitdiff
path: root/src/pl
AgeCommit message (Collapse)Author
2004-02-10Repair missing inclusions of -lintl for shared libraries.Tom Lane
2004-02-03Rename SortMem and VacuumMem to work_mem and maintenance_work_mem.Tom Lane
Make btree index creation and initial validation of foreign-key constraints use maintenance_work_mem rather than work_mem as their memory limit. Add some code to guc.c to allow these variables to be referenced by their old names in SHOW and SET commands, for backwards compatibility.
2004-01-24Fix problems with dropped columns in pltcl triggers, per report from Patrick ↵Tom Lane
Samson.
2004-01-21Fix bit-rot in support for building with --disable-shared. This patchTom Lane
gets us past 'make install', but initdb still fails for lack of conversion libraries ...
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-07Support function parameter names in plpgsql. This is the last ofTom Lane
Dennis Bjorklund's original patch for function parameter names, but there's still plenty left to do (documentation for instance...)
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-12-23Allow plpgsql variables' default value expressions to referenceTom Lane
existing variables (such as function parameters). Per gripe from David Fetter.
2003-11-29$Header: -> $PostgreSQL Changes ...PostgreSQL Daemon
2003-10-30Allow the query for a plpgsql cursor to begin with '(' as well as 'SELECT'.Tom Lane
Per example from Kumar, 30-Oct-03.
2003-10-01Add code to check that IF/WHILE/EXIT test expressions are boolean,Tom Lane
and try to coerce the values to boolean if not. Per recent discussions.
2003-09-30heap_open => relation_open to avoid unwanted restriction on relkind.Tom Lane
Per gripe from Gaetano Mendola.
2003-09-29Fixed type lookup in spi_prepare for possible qualifiedJan Wieck
type name specification. Jan
2003-09-28Restructure plpgsql's caching of 'simple' expression evaluation treesTom Lane
to be less dangerous, and often faster as well. ExprState trees are not kept across transaction boundaries; this eliminates problems with resource leakage in failed transactions. But by keeping them in a per-transaction EState, we can safely arrange for a single ExprState to be shared by all the expression evaluations done in a given plpgsql function call. (Formerly it seemed necessary to create and destroy an ExprState for each exec_eval_simple_expr() call.) This saves time in any scenario where a plpgsql function executes more than one expression. Seems to be about as fast as 7.3 for simple cases, and significantly faster for functions that do a lot of calculations.
2003-09-27Adjust Darwin build to use the default 'two level namespace' linkingTom Lane
method. Fix a number of places where shared libraries were linked without mentioning all the libraries they depend on; the Darwin and AIX ports are known to require this, and it doesn't seem to hurt any other supported platforms. (Hence, remove code in pl/tcl makefile that tried to avoid mentioning other libs if not needed.)
2003-09-25Make the world safe (more or less) for dropped columns in plpgsql rowtypes.Tom Lane
2003-09-16Fix some problems with dropped columns in plpython trigger functions.Tom Lane
2003-09-14Make pltcl create separate function objects when the same function isTom Lane
used as trigger on different relations. I am not convinced that Tcl actually has to have this, but it seems a good idea to make it be parallel to the other PLs that definitely do need it.
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-09-04Looks like plperl has same bug as pltcl.Tom Lane
2003-09-04Fix some problems with dropped columns in pltcl functions.Tom Lane
2003-08-18When compiling a plpgsql trigger function, include the OID of the tableTom Lane
the trigger is attached to in the hashkey. This ensures that we will create separate compiled trees for each table the trigger is used with, avoiding possible datatype-mismatch problems if the tables have different rowtypes. This is essentially the same bug recently identified in plpython --- though plpgsql doesn't seem as prone to crash when the rowtype changes underneath it. But failing robustly is no substitute for just working.
2003-08-08Another pgindent run with updated typedefs.Bruce Momjian
2003-08-08Avoid malloc(0). Although standard mallocs seem not to object,Tom Lane
some debugging malloc packages do.
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-28A visit from the message-style police ...Tom Lane
2003-07-27elog mop-up: bring some straggling fprintf(stderr)'s into the elog world.Tom Lane
2003-07-27Fix some localizability issues with existing errcontext() calls.Tom Lane
2003-07-27elog mop-up.Tom Lane
2003-07-26>>You can alias $0, similar to the argument variables. And, I confirmedBruce Momjian
>>that you cannot change the value, similar to the argument variables: > > Perhaps you shouldn't mark it isconst; then it would actually have some > usefulness (you could use it directly as a temporary variable to hold > the intended result). I can't see much value in aliasing it if it's > const, either. OK; the only change in this version is "isconst = false;". Now you can use $0 as a result placeholder if desired. E.g.: create or replace function tmp(anyelement, anyelement) returns anyarray as ' declare v_ret alias for $0; v_el1 alias for $1; v_el2 alias for $2; begin v_ret := ARRAY[v_el1, v_el2]; return v_ret; end; ' language 'plpgsql'; create table f(f1 text, f2 text, f3 int, f4 int); insert into f values ('a','b',1,2); insert into f values ('z','x',3,4); select tmp(f1,f2) from f; select tmp(f3,f4) from f; Joe Conway
2003-07-26Update to match error editing.Tom Lane
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-07-01Support polymorphic functions in plpgsql. Along the way, replaceTom Lane
linked-list search of function cache with hash-table lookup. By Joe Conway.
2003-06-30Rename plpython to plpythonu, and update documentation to reflect itsTom Lane
now-untrusted status.
2003-06-29Support expressions of the form 'scalar op ANY (array)' andTom Lane
'scalar op ALL (array)', where the operator is applied between the lefthand scalar and each element of the array. The operator must yield boolean; the result of the construct is the OR or AND of the per-element results, respectively. Original coding by Joe Conway, after an idea of Peter's. Rewritten by Tom to keep the implementation strictly separate from subqueries.
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-19Disallow dollar sign in operator names, instead allow it as a non-firstTom Lane
character in identifiers. The first change eliminates the current need to put spaces around parameter references, as in "x<=$2". The second change improves compatibility with Oracle and some other RDBMSes. This was discussed and agreed to back in January, but did not get done.
2003-06-17Fix error line numbers reported for errors in plpgsql_parse_word andTom Lane
siblings.
2003-06-11Fix brain damage in deciding which python input converter to use.Tom Lane
2003-05-29Ensure that in all flex lexers that are part of the backend, aTom Lane
yy_fatal_error() call results in elog(ERROR) not exit(). This was already fixed in the main lexer and plpgsql, but extend same technique to all the other dot-l files. Also, on review of the possible calls to yy_fatal_error(), it seems safe to use elog(ERROR) not elog(FATAL).
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-05-23Seems pl_funcs didn't have support for plpgsql PERFORM statement.Tom Lane
2003-05-16Small changes to use the absolute path to system catalogs.Tom Lane
Greg Sabino Mullane
2003-05-05Alter plpgsql's lexer so that yylineno and yymore are not used. ThisTom Lane
avoids 'input buffer overflow' failure on long literals, improves performance, gives the right answer for line position in functions containing multiline literals, suppresses annoying compiler warnings, and generally is so much better I wonder why we didn't do it before.
2003-04-27Fix plpgsql so that variables of composite types (rowtypes) can beTom Lane
declared without having to write %ROWTYPE. If the declared type of a variable is a composite type, it'll be taken to be a row variable automatically.
2003-04-24Infrastructure for upgraded error reporting mechanism. elog.c isTom Lane
rewritten and the protocol is changed, but most elog calls are still elog calls. Also, we need to contemplate mechanisms for controlling all this functionality --- eg, how much stuff should appear in the postmaster log? And what API should libpq expose for it?