Skip to content
Snippets Groups Projects
  1. Nov 13, 2013
  2. Jun 20, 2013
  3. May 11, 2013
  4. Feb 15, 2012
  5. Feb 14, 2012
    • Robert Haas's avatar
      Allow LEAKPROOF functions for better performance of security views. · cd30728f
      Robert Haas authored
      We don't normally allow quals to be pushed down into a view created
      with the security_barrier option, but functions without side effects
      are an exception: they're OK.  This allows much better performance in
      common cases, such as when using an equality operator (that might
      even be indexable).
      
      There is an outstanding issue here with the CREATE FUNCTION / ALTER
      FUNCTION syntax: there's no way to use ALTER FUNCTION to unset the
      leakproof flag.  But I'm committing this as-is so that it doesn't
      have to be rebased again; we can fix up the grammar in a future
      commit.
      
      KaiGai Kohei, with some wordsmithing by me.
      cd30728f
  6. Dec 19, 2011
    • Peter Eisentraut's avatar
      Add support for privileges on types · 72920557
      Peter Eisentraut authored
      This adds support for the more or less SQL-conforming USAGE privilege
      on types and domains.  The intent is to be able restrict which users
      can create dependencies on types, which restricts the way in which
      owners can alter types.
      
      reviewed by Yeb Havinga
      72920557
  7. Aug 07, 2011
    • Peter Eisentraut's avatar
      Fix a whitespace issue with the man pages · 6ef24487
      Peter Eisentraut authored
      There is what may actually be a mistake in our markup.  The problem is
      in a situation like
      
      <para>
       <command>FOO</command> is ...
      
      there is strictly speaking a line break before "FOO".  In the HTML
      output, this does not appear to be a problem, but in the man page
      output, this shows up, so you get double blank lines at odd places.
      
      So far, we have attempted to work around this with an XSL hack, but
      that causes other problems, such as creating run-ins in places like
      
      <acronym>SQL</acronym> <command>COPY</command>
      
      So fix the problem properly by removing the extra whitespace.  I only
      fixed the problems that affect the man page output, not all the
      places.
      6ef24487
  8. Nov 23, 2010
  9. Sep 20, 2010
  10. Apr 03, 2010
    • Peter Eisentraut's avatar
      Remove unnecessary xref endterm attributes and title ids · 6dcce398
      Peter Eisentraut authored
      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.
      6dcce398
  11. Mar 03, 2010
  12. Feb 25, 2010
  13. Feb 14, 2010
  14. Oct 08, 2009
  15. Oct 02, 2009
    • Tom Lane's avatar
      Fix erroneous handling of shared dependencies (ie dependencies on roles) · d691cb91
      Tom Lane authored
      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.
      d691cb91
  16. Sep 19, 2009
  17. Sep 04, 2009
    • Tom Lane's avatar
      Make LOAD of an already-loaded library into a no-op, instead of attempting · 602a9ef5
      Tom Lane authored
      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
      602a9ef5
  18. Dec 31, 2008
    • Tom Lane's avatar
      Add a WINDOW attribute to CREATE FUNCTION, and teach pg_dump about it, · 26ce4e85
      Tom Lane authored
      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.
      26ce4e85
  19. Dec 18, 2008
  20. Dec 04, 2008
  21. Nov 14, 2008
  22. Jul 18, 2008
  23. Jul 16, 2008
    • Tom Lane's avatar
      Support "variadic" functions, which can accept a variable number of arguments · d89737d3
      Tom Lane authored
      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
      d89737d3
  24. Sep 11, 2007
    • Tom Lane's avatar
      Arrange for SET LOCAL's effects to persist until the end of the current top · 82a47982
      Tom Lane authored
      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.
      82a47982
  25. Sep 03, 2007
  26. Apr 23, 2007
  27. Apr 20, 2007
    • Tom Lane's avatar
      Support explicit placement of the temporary-table schema within search_path. · aa27977f
      Tom Lane authored
      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
      aa27977f
  28. Feb 01, 2007
    • Bruce Momjian's avatar
      Wording cleanup for error messages. Also change can't -> cannot. · 8b4ff8b6
      Bruce Momjian authored
      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".
      8b4ff8b6
    • Bruce Momjian's avatar
      Update reference documentation on may/can/might: · e81c138e
      Bruce Momjian authored
      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".
      e81c138e
  29. Jan 22, 2007
    • Tom Lane's avatar
      Add COST and ROWS options to CREATE/ALTER FUNCTION, plus underlying pg_proc · 5a7471c3
      Tom Lane authored
      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.
      5a7471c3
  30. Nov 10, 2006
  31. Nov 03, 2006
  32. Sep 16, 2006
  33. Nov 01, 2005
  34. Jul 14, 2005
  35. Apr 01, 2005
  36. Jan 04, 2005
Loading