aboutsummaryrefslogtreecommitdiff
path: root/doc/src/sgml/ref/create_function.sgml
Commit message (Collapse)AuthorAge
* Remove useless whitespace at end of linesPeter Eisentraut2010-11-23
|
* Remove cvs keywords from all files.Magnus Hagander2010-09-20
|
* Remove unnecessary xref endterm attributes and title idsPeter Eisentraut2010-04-03
| | | | | | | | | The endterm attribute is mainly useful when the toolchain does not support automatic link target text generation for a particular situation. In the past, this was required by the man page tools for all reference page links, but that is no longer the case, and it now actually gets in the way of proper automatic link text generation. The only remaining use cases are currently xrefs to refsects.
* Fix SGML markup.Bruce Momjian2010-03-03
|
* Restructure CREATE FUNCTION "NOTES" section to be shorter; move itemsBruce Momjian2010-03-03
| | | | into proper sections, per suggestion from Tom.
* Document that after triggers that need to see changed rows should not beBruce Momjian2010-02-25
| | | | marked stable.
* Ooops, let's get the non-null vs null bit right ...Tom Lane2010-02-14
|
* Document the behavior of STRICT VARIADIC functions.Tom Lane2010-02-14
|
* Support use of function argument names to identify which actual argumentsTom Lane2009-10-08
| | | | | | | match which function parameters. The syntax uses AS, for example funcname(value AS arg1, anothervalue AS arg2) Pavel Stehule
* Fix erroneous handling of shared dependencies (ie dependencies on roles)Tom Lane2009-10-02
| | | | | | | | | | | | | | in CREATE OR REPLACE FUNCTION. The original code would update pg_shdepend as if a new function was being created, even if it wasn't, with two bad consequences: pg_shdepend might record the wrong owner for the function, and any dependencies for roles mentioned in the function's ACL would be lost. The fix is very easy: just don't touch pg_shdepend at all when doing a function replacement. Also update the CREATE FUNCTION reference page, which never explained exactly what changes and doesn't change in a function replacement. In passing, fix the CREATE VIEW reference page similarly; there's no code bug there, but the docs didn't say what happens.
* Make the placeholder naming in the synopses of the SQL help more consistentPeter Eisentraut2009-09-19
|
* Make LOAD of an already-loaded library into a no-op, instead of attemptingTom Lane2009-09-03
| | | | | | | | | | | | | | | | | | | | | | | to unload and re-load the library. The difficulty with unloading a library is that we haven't defined safe protocols for doing so. In particular, there's no safe mechanism for getting out of a "hook" function pointer unless libraries are unloaded in reverse order of loading. And there's no mechanism at all for undefining a custom GUC variable, so GUC would be left with a pointer to an old value that might or might not still be valid, and very possibly wouldn't be in the same place anymore. While the unload and reload behavior had some usefulness in easing development of new loadable libraries, it's of no use whatever to normal users, so just disabling it isn't giving up that much. Someday we might care to expend the effort to develop safe unload protocols; but even if we did, there'd be little certainty that every third-party loadable module was following them, so some security restrictions would still be needed. Back-patch to 8.2; before that, LOAD was superuser-only anyway. Security: unprivileged users could crash backend. CVE not assigned yet
* Add a WINDOW attribute to CREATE FUNCTION, and teach pg_dump about it,Tom Lane2008-12-31
| | | | | | | | | | | so that user-defined window functions are possible. For the moment you'll have to write them in C, for lack of any interface to the WindowObject API in the available PLs, but it's better than no support at all. There was some debate about the best syntax for this. I ended up choosing the "it's an attribute" position --- the other approach will inevitably be more work, and the likely market for user-defined window functions is probably too small to justify it.
* Code review for function default parameters patch. Fix numerous problems asTom Lane2008-12-18
| | | | | per recent discussions. In passing this also fixes a couple of bugs in the previous variadic-parameters patch.
* Default values for function argumentsPeter Eisentraut2008-12-04
| | | | Pavel Stehule, with some tweaks by Peter Eisentraut
* Set SQL man pages to be section 7 by default, and only transform them toPeter Eisentraut2008-11-14
| | | | | | | | | another section if required by the platform (instead of the old way of building them in section "l" and always transforming them to the platform-specific section). This speeds up the installation on common platforms, and it avoids some funny business with the man page tools and build process.
* Implement SQL-spec RETURNS TABLE syntax for functions.Tom Lane2008-07-18
| | | | | | | (Unlike the original submission, this patch treats TABLE output parameters as being entirely equivalent to OUT parameters -- tgl) Pavel Stehule
* Support "variadic" functions, which can accept a variable number of argumentsTom Lane2008-07-16
| | | | | | | | | | | | | | so long as all the trailing arguments are of the same (non-array) type. The function receives them as a single array argument (which is why they have to all be the same type). It might be useful to extend this facility to aggregates, but this patch doesn't do that. This patch imposes a noticeable slowdown on function lookup --- a follow-on patch will fix that by adding a redundant column to pg_proc. Pavel Stehule
* Arrange for SET LOCAL's effects to persist until the end of the current topTom Lane2007-09-11
| | | | | | | | | | | | | | transaction, unless rolled back or overridden by a SET clause for the same variable attached to a surrounding function call. Per discussion, these seem the best semantics. Note that this is an INCOMPATIBLE CHANGE: in 8.0 through 8.2, SET LOCAL's effects disappeared at subtransaction commit (leading to behavior that made little sense at the SQL level). I took advantage of the opportunity to rewrite and simplify the GUC variable save/restore logic a little bit. The old idea of a "tentative" value is gone; it was a hangover from before we had a stack. Also, we no longer need a stack entry for every nesting level, but only for those in which a variable's value actually changed.
* Support SET FROM CURRENT in CREATE/ALTER FUNCTION, ALTER DATABASE, ALTER ROLE.Tom Lane2007-09-03
| | | | | | | (Actually, it works as a plain statement too, but I didn't document that because it seems a bit useless.) Unify VariableResetStmt with VariableSetStmt, and clean up some ancient cruft in the representation of same.
* Implement function-local GUC parameter settings, as per recent discussion.Tom Lane2007-09-03
| | | | | | | There are still some loose ends: I didn't do anything about the SET FROM CURRENT idea yet, and it's not real clear whether we are happy with the interaction of SET LOCAL with function-local settings. The documentation is a bit spartan, too.
* Fix newly-introduced documentation typo.Neil Conway2007-04-23
|
* Support explicit placement of the temporary-table schema within search_path.Tom Lane2007-04-20
| | | | | | | | | | | | | This is needed to allow a security-definer function to set a truly secure value of search_path. Without it, a malicious user can use temporary objects to execute code with the privileges of the security-definer function. Even pushing the temp schema to the back of the search path is not quite good enough, because a function or operator at the back of the path might still capture control from one nearer the front due to having a more exact datatype match. Hence, disable searching the temp schema altogether for functions and operators. Security: CVE-2007-2138
* Wording cleanup for error messages. Also change can't -> cannot.Bruce Momjian2007-02-01
| | | | | | | | | | | | | | Standard English uses "may", "can", and "might" in different ways: may - permission, "You may borrow my rake." can - ability, "I can lift that log." might - possibility, "It might rain today." Unfortunately, in conversational English, their use is often mixed, as in, "You may use this variable to do X", when in fact, "can" is a better choice. Similarly, "It may crash" is better stated, "It might crash".
* Update reference documentation on may/can/might:Bruce Momjian2007-01-31
| | | | | | | | | | | | | | Standard English uses "may", "can", and "might" in different ways: may - permission, "You may borrow my rake." can - ability, "I can lift that log." might - possibility, "It might rain today." Unfortunately, in conversational English, their use is often mixed, as in, "You may use this variable to do X", when in fact, "can" is a better choice. Similarly, "It may crash" is better stated, "It might crash".
* Add COST and ROWS options to CREATE/ALTER FUNCTION, plus underlying pg_procTom Lane2007-01-22
| | | | | | | | | | | | columns procost and prorows, to allow simple user adjustment of the estimated cost of a function call, as well as control of the estimated number of rows returned by a set-returning function. We might eventually wish to extend this to allow function-specific estimation routines, but there seems to be consensus that we should try a simple constant estimate first. In particular this provides a relatively simple way to control the order in which different WHERE clauses are applied in a plan node, which is a Good Thing in view of the fact that the recent EquivalenceClass planner rewrite made that much less predictable than before.
* Emphasize that immutable and stable functions are not allowed to modifyTom Lane2006-11-10
| | | | | the database. xfunc.sgml was already pretty definite on the point, but it doesn't hurt to make it clear here too.
* Mention 'void' as the proper return type when there's nothing toTom Lane2006-11-03
| | | | return, per suggestion from Joachim Wieland.
* Remove emacs info from footer of SGML files.Bruce Momjian2006-09-16
|
* Make an editorial pass over the reference pages.Tom Lane2005-11-01
|
* This doc patch replaces all inappropriate references to SQL:1999 when itNeil Conway2005-07-14
| | | | | is used as if it were the latest (and/or still valid) SQL standard. SQL:2003 is used in its place. Patch from Simon Riggs.
* First phase of OUT-parameters project. We can now define and use SQLTom Lane2005-03-31
| | | | | functions with OUT parameters. The various PLs still need work, as does pg_dump. Rudimentary docs and regression tests included.
* More minor updates and copy-editing.Tom Lane2005-01-04
|
* Update of conformance information to SQL:2003Peter Eisentraut2004-11-27
| | | | | | by Troels Arvin, Simon Riggs, Elein Mustain Make spelling of SQL standard names uniform.
* Remove more traces of libpgtcl from the source tree. Also, make someNeil Conway2004-10-01
| | | | | semi-related SGML cleanup. Original patch from ljb220@mindspring.com, additional cleanup by Neil Conway.
* Some editorializing on the docs for the dollar-quoting feature: fixTom Lane2004-09-20
| | | | | grammar, don't drop discussions into the middle of unrelated discussions, etc.
* Minor doc tweak: mention that function names can be optionally schema-Neil Conway2004-09-16
| | | | qualified.
* Redesign query-snapshot timing so that volatile functions in READ COMMITTEDTom Lane2004-09-13
| | | | | | | | | | | | | 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.
* Example for create function using argument namesBruce Momjian2004-07-11
| | | | Gavin Sherry
* Add argument name to syntax.Dennis Bjorklund2004-06-25
|
* Add documentation for the new "dollar quoting" feature, and update existingNeil Conway2004-05-16
| | | | | examples to use dollar quoting when appropriate. Original patch from David Fetter, additional work and editorializing by Neil Conway.
* $Header: -> $PostgreSQL Changes ...PostgreSQL Daemon2003-11-29
|
* Documentation cleanupPeter Eisentraut2003-11-12
|
* Add mention of quotes on function body to NOTES section.Bruce Momjian2003-10-26
| | | | Oliver Elphick
* This patch fixes a few missed GUC variables that were still upper case,Bruce Momjian2003-09-11
| | | | | | | makes a few more small improvements to runtime.sgml, and makes some SGML conventions more consistent. Neil Conway
* This patch fixes a trivial typo in the CREATE FUNCTION ref page.Bruce Momjian2003-09-10
| | | | Neil Conway
* Remove a bunch of content-free Diagnostics sections, as per previousTom Lane2003-09-09
| | | | discussion. (Still have some work to do editing the remainder.)
* Add/edit index entries.Peter Eisentraut2003-08-31
|
* First batch of object rename commands.Peter Eisentraut2003-06-27
|
* More editing of reference pages.Peter Eisentraut2003-04-22
|