1. 11 12月, 2009 1 次提交
    • I
      Add large object access control. · f1325ce2
      Itagaki Takahiro 提交于
      A new system catalog pg_largeobject_metadata manages
      ownership and access privileges of large objects.
      
      KaiGai Kohei, reviewed by Jaime Casanova.
      f1325ce2
  2. 07 12月, 2009 1 次提交
  3. 21 11月, 2009 1 次提交
    • T
      Add a WHEN clause to CREATE TRIGGER, allowing a boolean expression to be · 7fc0f062
      Tom Lane 提交于
      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
  4. 15 10月, 2009 1 次提交
    • T
      Support SQL-compliant triggers on columns, ie fire only if certain columns · b2734a0d
      Tom Lane 提交于
      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
  5. 08 10月, 2009 1 次提交
    • A
      Make it possibly to specify GUC params per user and per database. · 2eda8dfb
      Alvaro Herrera 提交于
      Create a new catalog pg_db_role_setting where they are now stored, and better
      encapsulate the code that deals with settings into its realm.  The old
      datconfig and rolconfig columns are removed.
      
      psql has gained a \drds command to display the settings.
      
      Backwards compatibility warning: while the backwards-compatible system views
      still have the config columns, they no longer completely represent the
      configuration for a user or database.
      
      Catalog version bumped.
      2eda8dfb
  6. 06 10月, 2009 1 次提交
    • T
      Create an ALTER DEFAULT PRIVILEGES command, which allows users to adjust · 249724cb
      Tom Lane 提交于
      the privileges that will be applied to subsequently-created objects.
      
      Such adjustments are always per owning role, and can be restricted to objects
      created in particular schemas too.  A notable benefit is that users can
      override the traditional default privilege settings, eg, the PUBLIC EXECUTE
      privilege traditionally granted by default for functions.
      
      Petr Jelinek
      249724cb
  7. 23 9月, 2009 1 次提交
    • T
      Implement the DO statement to support execution of PL code without having · 9048b731
      Tom Lane 提交于
      to create a function for it.
      
      Procedural languages now have an additional entry point, namely a function
      to execute an inline code block.  This seemed a better design than trying
      to hide the transient-ness of the code from the PL.  As of this patch, only
      plpgsql has an inline handler, but probably people will soon write handlers
      for the other standard PLs.
      
      In passing, remove the long-dead LANCOMPILER option of CREATE LANGUAGE.
      
      Petr Jelinek
      9048b731
  8. 11 8月, 2009 1 次提交
  9. 04 8月, 2009 1 次提交
    • T
      Cause pg_proc.probin to be declared as text, not bytea. Everything was · f192e4a5
      Tom Lane 提交于
      already treating it as text anyway, to the point that I couldn't find anything
      to change except the datatype markings in catalog/*.h.  The only effect that
      the bytea declaration had was to cause byteaout() to be invoked when pg_dump
      (or another client program) inspected the column value.  Since pg_dump wasn't
      expecting that, but just treating what it got as text, the net result is that
      dump and reload would mangle any backslashes or non-ASCII characters in the
      filename string for a C-language function.  That is a very long-standing bug,
      but given the lack of field complaints it doesn't seem worth trying to find
      a back-patchable fix.  We'll just make this change to fix it going forward.
      
      This change will also forestall problems after the planned change to let bytea
      emit hex output instead of escaped characters.
      f192e4a5
  10. 03 8月, 2009 1 次提交
  11. 30 7月, 2009 1 次提交
    • T
      Support deferrable uniqueness constraints. · 25d9bf2e
      Tom Lane 提交于
      The current implementation fires an AFTER ROW trigger for each tuple that
      looks like it might be non-unique according to the index contents at the
      time of insertion.  This works well as long as there aren't many conflicts,
      but won't scale to massive unique-key reassignments.  Improving that case
      is a TODO item.
      
      Dean Rasheed
      25d9bf2e
  12. 28 7月, 2009 1 次提交
    • T
      Add system catalog columns pg_constraint.conindid and pg_trigger.tgconstrindid. · c1b9ec24
      Tom Lane 提交于
      conindid is the index supporting a constraint.  We can use this not only for
      unique/primary-key constraints, but also foreign-key constraints, which
      depend on the unique index that constrains the referenced columns.
      tgconstrindid is just copied from the constraint's conindid field, or is
      zero for triggers not associated with constraints.
      
      This is mainly intended as infrastructure for upcoming patches, but it has
      some virtue in itself, since it exposes a relationship that you formerly
      had to grovel in pg_depend to determine.  I simplified one information_schema
      view accordingly.  (There is a pg_dump query that could also use conindid,
      but I left it alone because it wasn't clear it'd get any faster.)
      c1b9ec24
  13. 02 7月, 2009 1 次提交
  14. 01 4月, 2009 1 次提交
  15. 06 3月, 2009 1 次提交
    • T
      Teach the planner to support index access methods that only implement · 00ce7377
      Tom Lane 提交于
      amgettuple or only implement amgetbitmap, instead of the former assumption
      that every AM supports both APIs.  Extracted with minor editorialization
      from Teodor's fast-GIN-insert patch; whatever becomes of that, this seems
      like a simple and reasonable generalization of the index AM interface spec.
      00ce7377
  16. 24 2月, 2009 1 次提交
  17. 10 2月, 2009 1 次提交
  18. 08 2月, 2009 1 次提交
  19. 07 2月, 2009 1 次提交
  20. 05 2月, 2009 1 次提交
  21. 02 2月, 2009 1 次提交
  22. 27 1月, 2009 1 次提交
  23. 23 1月, 2009 2 次提交
  24. 16 1月, 2009 1 次提交
  25. 09 1月, 2009 2 次提交
  26. 20 12月, 2008 2 次提交
  27. 19 12月, 2008 1 次提交
  28. 22 11月, 2008 1 次提交
  29. 10 11月, 2008 2 次提交
  30. 31 10月, 2008 1 次提交
  31. 18 10月, 2008 1 次提交
    • T
      Add a new column to pg_am to specify whether an index AM supports backward · e4fb8ff0
      Tom Lane 提交于
      scanning; GiST and GIN do not, and it seems like too much trouble to make
      them do so.  By teaching ExecSupportsBackwardScan() about this restriction,
      we ensure that the planner will protect a scroll cursor from the problem
      by adding a Materialize node.
      
      In passing, fix another longstanding bug in the same area: backwards scan of
      a plan with set-returning functions in the targetlist did not work either,
      since the TupFromTlist expansion code pays no attention to direction (and
      has no way to run a SRF backwards anyway).  Again the fix is to make
      ExecSupportsBackwardScan check this restriction.
      
      Also adjust the index AM API specification to note that mark/restore support
      is unnecessary if the AM can't produce ordered output.
      e4fb8ff0
  32. 06 10月, 2008 2 次提交
  33. 23 9月, 2008 1 次提交
  34. 20 9月, 2008 1 次提交
  35. 16 9月, 2008 1 次提交
    • T
      Change hash indexes to store only the hash code rather than the whole indexed · 4adc2f72
      Tom Lane 提交于
      value.  This means that hash index lookups are always lossy and have to be
      rechecked when the heap is visited; however, the gain in index compactness
      outweighs this when the indexed values are wide.  Also, we only need to
      perform datatype comparisons when the hash codes match exactly, rather than
      for every entry in the hash bucket; so it could also win for datatypes that
      have expensive comparison functions.  A small additional win is gained by
      keeping hash index pages sorted by hash code and using binary search to reduce
      the number of index tuples we have to look at.
      
      Xiao Meng
      
      This commit also incorporates Zdenek Kotala's patch to isolate hash metapages
      and hash bitmaps a bit better from the page header datastructures.
      4adc2f72