Skip to content
Snippets Groups Projects
  1. Jun 21, 2014
    • Kevin Grittner's avatar
      Fix documentation template for CREATE TRIGGER. · 07353de4
      Kevin Grittner authored
      By using curly braces, the template had specified that one of
      "NOT DEFERRABLE", "INITIALLY IMMEDIATE", or "INITIALLY DEFERRED"
      was required on any CREATE TRIGGER statement, which is not
      accurate.  Change to square brackets makes that optional.
      
      Backpatch to 9.1, where the error was introduced.
      07353de4
  2. Jun 22, 2012
  3. Feb 23, 2012
    • Tom Lane's avatar
      Require execute permission on the trigger function for CREATE TRIGGER. · 891e6e7b
      Tom Lane authored
      This check was overlooked when we added function execute permissions to the
      system years ago.  For an ordinary trigger function it's not a big deal,
      since trigger functions execute with the permissions of the table owner,
      so they couldn't do anything the user issuing the CREATE TRIGGER couldn't
      have done anyway.  However, if a trigger function is SECURITY DEFINER,
      that is not the case.  The lack of checking would allow another user to
      install it on his own table and then invoke it with, essentially, forged
      input data; which the trigger function is unlikely to realize, so it might
      do something undesirable, for instance insert false entries in an audit log
      table.
      
      Reported by Dinesh Kumar, patch by Robert Haas
      
      Security: CVE-2012-0866
      891e6e7b
  4. 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
  5. Mar 07, 2011
  6. Mar 02, 2011
  7. Nov 09, 2010
  8. Oct 10, 2010
    • Tom Lane's avatar
      Support triggers on views. · 2ec993a7
      Tom Lane authored
      This patch adds the SQL-standard concept of an INSTEAD OF trigger, which
      is fired instead of performing a physical insert/update/delete.  The
      trigger function is passed the entire old and/or new rows of the view,
      and must figure out what to do to the underlying tables to implement
      the update.  So this feature can be used to implement updatable views
      using trigger programming style rather than rule hacking.
      
      In passing, this patch corrects the names of some columns in the
      information_schema.triggers view.  It seems the SQL committee renamed
      them somewhere between SQL:99 and SQL:2003.
      
      Dean Rasheed, reviewed by Bernd Helmle; some additional hacking by me.
      2ec993a7
  9. Sep 20, 2010
  10. Aug 17, 2010
  11. 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
  12. Nov 20, 2009
    • Tom Lane's avatar
      Add a WHEN clause to CREATE TRIGGER, allowing a boolean expression to be · 7fc0f062
      Tom Lane authored
      checked to determine whether the trigger should be fired.
      
      For BEFORE triggers this is mostly a matter of spec compliance; but for AFTER
      triggers it can provide a noticeable performance improvement, since queuing of
      a deferred trigger event and re-fetching of the row(s) at end of statement can
      be short-circuited if the trigger does not need to be fired.
      
      Takahiro Itagaki, reviewed by KaiGai Kohei.
      7fc0f062
  13. Oct 15, 2009
    • Tom Lane's avatar
      Support SQL-compliant triggers on columns, ie fire only if certain columns · b2734a0d
      Tom Lane authored
      are named in the UPDATE's SET list.
      
      Note: the schema of pg_trigger has not actually changed; we've just started
      to use a column that was there all along.  catversion bumped anyway so that
      this commit is included in the history of potentially interesting changes
      to system catalog contents.
      
      Itagaki Takahiro
      b2734a0d
  14. Sep 19, 2009
  15. Nov 14, 2008
  16. Mar 28, 2008
  17. 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
  18. Oct 23, 2006
  19. Sep 16, 2006
  20. Dec 09, 2005
  21. Nov 01, 2005
  22. Jul 14, 2005
  23. Nov 27, 2004
  24. Dec 01, 2003
  25. Nov 29, 2003
    • PostgreSQL Daemon's avatar
      · 969685ad
      PostgreSQL Daemon authored
      $Header: -> $PostgreSQL Changes ...
      969685ad
  26. Sep 22, 2003
  27. Sep 09, 2003
  28. Aug 31, 2003
  29. Apr 22, 2003
  30. Mar 25, 2003
  31. Jan 19, 2003
    • Bruce Momjian's avatar
      This patch includes a lot of minor cleanups to the SGML documentation, · be2b660e
      Bruce Momjian authored
      including:
      
      - replacing all the appropriate usages of <citetitle>PostgreSQL
      ...</citetitle> with &cite-user;, &cite-admin;, and so on
      
      - fix an omission in the EXECUTE documentation
      
      - add some more text to the EXPLAIN documentation
      
      - improve the PL/PgSQL RETURN NEXT documentation (more work to do here)
      
      - minor markup fixes
      
      
      Neil Conway
      be2b660e
  32. Dec 17, 2002
  33. Nov 23, 2002
    • Bruce Momjian's avatar
      This patch implements FOR EACH STATEMENT triggers, per my email to · 1b7f3cc0
      Bruce Momjian authored
      -hackers a couple days ago.
      
      Notes/caveats:
      
              - added regression tests for the new functionality, all
                regression tests pass on my machine
      
              - added pg_dump support
      
              - updated PL/PgSQL to support per-statement triggers; didn't
                look at the other procedural languages.
      
              - there's (even) more code duplication in trigger.c than there
                was previously. Any suggestions on how to refactor the
                ExecXXXTriggers() functions to reuse more code would be
                welcome -- I took a brief look at it, but couldn't see an
                easy way to do it (there are several subtly-different
                versions of the code in question)
      
              - updated the documentation. I also took the liberty of
                removing a big chunk of duplicated syntax documentation in
                the Programmer's Guide on triggers, and moving that
                information to the CREATE TRIGGER reference page.
      
              - I also included some spelling fixes and similar small
                cleanups I noticed while making the changes. If you'd like
                me to split those into a separate patch, let me know.
      
      Neil Conway
      1b7f3cc0
  34. Nov 22, 2002
  35. Sep 21, 2002
    • Tom Lane's avatar
      Provide an upgrade strategy for dump files containing functions declared · eb3adab5
      Tom Lane authored
      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.
      eb3adab5
  36. Aug 22, 2002
  37. May 18, 2002
  38. Apr 24, 2002
  39. Apr 21, 2002
    • Thomas G. Lockhart's avatar
      Augment the date/time examples in the User's Guide to reflect the newer · c05f29e8
      Thomas G. Lockhart authored
       capabilities of specifying time zones as intervals per SQL9x.
      Put refentrytitle contents on the same line as the tag.
       Otherwise, leading whitespace is propagated into the product, which
       (at least) messes up the ToC layout.
      Remove (some) docinfo tags containing dates. Best to omit if the dates
       are not accurate; maybe use CVS dates instead or leave them out.
      c05f29e8
Loading