- 22 11月, 2004 1 次提交
-
-
由 Tom Lane 提交于
operations are now run as subtransactions, so that errors in them can be reported as ordinary Perl or Tcl errors and caught by the normal error handling convention of those languages. Also do some minor code cleanup in pltcl.c: extract a large chunk of duplicated code in pltcl_SPI_execute and pltcl_SPI_execute_plan into a shared subroutine.
-
- 21 11月, 2004 1 次提交
-
-
由 Tom Lane 提交于
rather than longjmp'ing clear out of Perl and thereby leaving Perl in a broken state. Also some minor prettification of error messages. Still need to do something with spi_exec_query() error handling.
-
- 19 11月, 2004 1 次提交
-
-
由 Tom Lane 提交于
may expand the Perl stack, therefore we must SPAGAIN to reload the local stack pointer after calling it. Also a couple other marginal readability improvements.
-
- 18 11月, 2004 1 次提交
-
-
由 Tom Lane 提交于
some of the bugs exposed thereby. The remaining 'might be used uninitialized' warnings look like live bugs, but I am not familiar enough with Perl/C hacking to tell how to fix them.
-
- 17 11月, 2004 1 次提交
-
-
由 Tom Lane 提交于
patch, but allow srand and disallow sprintf as per subsequent discussion.
-
- 16 10月, 2004 1 次提交
-
-
由 Bruce Momjian 提交于
1. Two minor cleanups: - We don't need to call hv_exists+hv_fetch; we should just check the return value of hv_fetch. - newSVpv("undef",0) is the string "undef", not a real undef. 2. This should fix the bug Andrew Dunstan described in a recent -hackers post. It replaces three bogus "eval_pv(key, 0)" calls with newSVpv, and eliminates another redundant hv_exists+hv_fetch pair. 3. plperl_build_tuple_argument builds up a string of Perl code to create a hash representing the tuple. This patch creates the hash directly. 4. Another minor cleanup: replace a couple of av_store()s with av_push. 5. Analogous to #3 for plperl_trigger_build_args. This patch removes the static sv_add_tuple_value function, which does much the same as two other utility functions defined later, and merges the functionality into plperl_hash_from_tuple. I have tested the patches to the best of my limited ability, but I would appreciate it very much if someone else could review and test them too. (Thanks to Andrew and David Fetter for their help with some testing.) Abhijit Menon-Sen
-
- 08 10月, 2004 1 次提交
-
-
由 Bruce Momjian 提交于
-
- 07 10月, 2004 2 次提交
-
-
由 Bruce Momjian 提交于
-
由 Bruce Momjian 提交于
uid_t/gid_t too.
-
- 14 9月, 2004 1 次提交
-
-
由 Tom Lane 提交于
mode see a fresh snapshot for each command in the function, rather than using the latest interactive command's snapshot. Also, suppress fresh snapshots as well as CommandCounterIncrement inside STABLE and IMMUTABLE functions, instead using the snapshot taken for the most closely nested regular query. (This behavior is only sane for read-only functions, so the patch also enforces that such functions contain only SELECT commands.) As per my proposal of 6-Sep-2004; I note that I floated essentially the same proposal on 19-Jun-2002, but that discussion tailed off without any action. Since 8.0 seems like the right place to be taking possibly nontrivial backwards compatibility hits, let's get it done now.
-
- 30 8月, 2004 1 次提交
-
-
由 Bruce Momjian 提交于
-
- 29 8月, 2004 1 次提交
-
-
由 Bruce Momjian 提交于
-
- 31 7月, 2004 1 次提交
-
-
由 Tom Lane 提交于
possible to trap an error inside a function rather than letting it propagate out to PostgresMain. You still have to use AbortCurrentTransaction to clean up, but at least the error handling itself will cooperate.
-
- 22 7月, 2004 1 次提交
-
-
由 Bruce Momjian 提交于
foo()' where foo() is a plperl function that returns a single composite. Andrew Dunstan
-
- 12 7月, 2004 1 次提交
-
-
由 Bruce Momjian 提交于
currently unapplied regarding spi_internal.c, makes some additional fixes relating to return types, and also contains the fix for preventing the use of insecure versions of Safe.pm. There is one remaing return case that does not appear to work, namely return of a composite directly in a select, i.e. if foo returns some composite type, 'select * from foo()' works but 'select foo()' doesn't. We will either fix that or document it as a limitation. The function plperl_func_handler is a mess - I will try to get it cleaned up (and split up) in a subsequent patch, time permitting. Also, reiterating previous advice - this changes slightly the API for spi_exec_query - the returned object has either 2 or 3 members: 'status' (string) and 'proceesed' (int,- number of rows) and, if rows are returned, 'rows' (array of tuple hashes). Andrew Dunstan
-
- 02 7月, 2004 1 次提交
-
-
由 Joe Conway 提交于
plperlNG. Review and minor cleanup/improvements by Joe Conway. Summary of new functionality: - Shared data space and namespace. There is a new global variable %_SHARED that functions can use to store and save data between invocations of a function, or between different functions. Also, all trusted plperl function now share a common Safe container (this is an optimization, also), which they can use for storing non-lexical variables, functions, etc. - Triggers are now supported - Records can now be returned (as a hash reference) - Sets of records can now be returned (as a reference to an array of hash references). - New function spi_exec_query() provided for performing db functions or getting data from db. - Optimization for counting hash keys (Abhijit Menon-Sen) - Allow return of 'record' and 'setof record'
-
- 06 6月, 2004 1 次提交
-
-
由 Tom Lane 提交于
of a composite type to get that type's OID as their second parameter, in place of typelem which is useless. The actual changes are mostly centralized in getTypeInputInfo and siblings, but I had to fix a few places that were fetching pg_type.typelem for themselves instead of using the lsyscache.c routines. Also, I renamed all the related variables from 'typelem' to 'typioparam' to discourage people from assuming that they necessarily contain array element types.
-
- 02 4月, 2004 1 次提交
-
-
由 Tom Lane 提交于
results with tuples as ordinary varlena Datums. This commit does not in itself do much for us, except eliminate the horrid memory leak associated with evaluation of whole-row variables. However, it lays the groundwork for allowing composite types as table columns, and perhaps some other useful features as well. Per my proposal of a few days ago.
-
- 07 1月, 2004 1 次提交
-
-
由 Tom 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.
-
- 30 11月, 2003 1 次提交
-
-
由 PostgreSQL Daemon 提交于
$Header: -> $PostgreSQL Changes ...
-
- 04 9月, 2003 1 次提交
-
-
由 Tom Lane 提交于
-
- 04 8月, 2003 1 次提交
-
-
由 Bruce Momjian 提交于
-
- 01 8月, 2003 1 次提交
-
-
由 Tom Lane 提交于
function is not found. Also, make all the PL libraries have initialization functions with standard names. Patch from Joe Conway.
-
- 26 7月, 2003 1 次提交
-
-
由 Tom Lane 提交于
look ... I'm not real certain which errors are strictly internal and which are likely to be provoked by users.
-
- 21 4月, 2003 1 次提交
-
-
由 Tom Lane 提交于
-
- 22 9月, 2002 1 次提交
-
-
由 Tom Lane 提交于
with OPAQUE. CREATE LANGUAGE, CREATE TRIGGER, and CREATE TYPE will all accept references to functions declared with OPAQUE --- but they will issue a NOTICE, and will modify the function entries in pg_proc to have the preferred type-safe argument or result types instead of OPAQUE. Per recent pghackers discussions.
-
- 05 9月, 2002 2 次提交
-
-
由 Tom Lane 提交于
remove unnecessary inclusions.
-
由 Bruce Momjian 提交于
-
- 22 8月, 2002 1 次提交
-
-
由 Tom 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 ...
-
- 16 6月, 2002 1 次提交
-
-
由 Bruce 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
-
- 05 5月, 2002 1 次提交
-
-
由 Tom Lane 提交于
As proof of concept, provide an alternate implementation based on POSIX semaphores. Also push the SysV shared-memory implementation into a separate file so that it can be replaced conveniently.
-
- 07 3月, 2002 1 次提交
-
-
由 Bruce Momjian 提交于
still needed because only removed in 7.4.
-
- 25 1月, 2002 2 次提交
- 06 11月, 2001 1 次提交
-
-
由 Bruce Momjian 提交于
initdb/regression tests pass.
-
- 25 10月, 2001 1 次提交
-
-
由 Bruce Momjian 提交于
tests pass.
-
- 20 10月, 2001 1 次提交
-
-
由 Tom Lane 提交于
REPLACE FUNCTION. Clean up typlen/typmod errors inherited from pltcl.
-
- 07 10月, 2001 1 次提交
-
-
由 Tom 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.
-
- 19 6月, 2001 1 次提交
-
-
由 Bruce Momjian 提交于
modifiable repositories, I have a clean untrusted plperl patch to offer you :) Highlights: * There's one perl interpreter used for both trusted and untrusted procedures. I do think its unnecessary to keep two perl interpreters around. If someone can break out from trusted "Safe" perl mode, well, they can do what they want already. If someone disagrees, I can change this. * Opcode is not statically loaded anymore. Instead, we load Dynaloader, which then can grab Opcode (and anything else you can 'use') on its own. * Checked to work on FreeBSD 4.3 + perl 5.5.3 , OpenBSD 2.8 + perl5.6.1, RedHat 6.2 + perl 5.5.3 * Uses ExtUtils::Embed to find what options are necessary to link with perl shared libraries * createlang is also updated, it can create untrusted perl using 'plperlu' * Example script (assuming you have Mail::Sendmail installed): create function foo() returns text as ' use Mail::Sendmail; %mail = ( To => q(you@yourname.com), From => q(me@here.com), Message => "This is a very short message" ); sendmail(%mail) or die $Mail::Sendmail::error; return "OK. Log says:\n", $Mail::Sendmail::log; ' language 'plperlu'; Alex Pilosov
-
- 09 6月, 2001 1 次提交
-
-
由 Tom Lane 提交于
-