1. 25 3月, 2010 1 次提交
  2. 17 2月, 2010 2 次提交
  3. 08 2月, 2010 1 次提交
    • T
      Create a "relation mapping" infrastructure to support changing the relfilenodes · b9b8831a
      Tom Lane 提交于
      of shared or nailed system catalogs.  This has two key benefits:
      
      * The new CLUSTER-based VACUUM FULL can be applied safely to all catalogs.
      
      * We no longer have to use an unsafe reindex-in-place approach for reindexing
        shared catalogs.
      
      CLUSTER on nailed catalogs now works too, although I left it disabled on
      shared catalogs because the resulting pg_index.indisclustered update would
      only be visible in one database.
      
      Since reindexing shared system catalogs is now fully transactional and
      crash-safe, the former special cases in REINDEX behavior have been removed;
      shared catalogs are treated the same as non-shared.
      
      This commit does not do anything about the recently-discussed problem of
      deadlocks between VACUUM FULL/CLUSTER on a system catalog and other
      concurrent queries; will address that in a separate patch.  As a stopgap,
      parallel_schedule has been tweaked to run vacuum.sql by itself, to avoid
      such failures during the regression tests.
      b9b8831a
  4. 04 2月, 2010 1 次提交
  5. 23 1月, 2010 1 次提交
    • R
      Replace ALTER TABLE ... SET STATISTICS DISTINCT with a more general mechanism. · 76a47c0e
      Robert Haas 提交于
      Attributes can now have options, just as relations and tablespaces do, and
      the reloptions code is used to parse, validate, and store them.  For
      simplicity and because these options are not performance critical, we store
      them in a separate cache rather than the main relcache.
      
      Thanks to Alex Hunsaker for the review.
      76a47c0e
  6. 18 1月, 2010 1 次提交
    • T
      Improve the handling of SET CONSTRAINTS commands by having them search · 9a915e59
      Tom Lane 提交于
      pg_constraint before searching pg_trigger.  This allows saner handling of
      corner cases; in particular we now say "constraint is not deferrable"
      rather than "constraint does not exist" when the command is applied to
      a constraint that's inherently non-deferrable.  Per a gripe several months
      ago from hubert depesz lubaczewski.
      
      To make this work without breaking user-defined constraint triggers,
      we have to add entries for them to pg_constraint.  However, in return
      we can remove the pgconstrname column from pg_constraint, which represents
      a fairly sizable space savings.  I also replaced the tgisconstraint column
      with tgisinternal; the old meaning of tgisconstraint can now be had by
      testing for nonzero tgconstraint, while there is no other way to get
      the old meaning of nonzero tgconstraint, namely that the trigger was
      internally generated rather than being user-created.
      
      In passing, fix an old misstatement in the docs and comments, namely that
      pg_trigger.tgdeferrable is exactly redundant with pg_constraint.condeferrable.
      Actually, we mark RI action triggers as nondeferrable even when they belong to
      a nominally deferrable FK constraint.  The SET CONSTRAINTS code now relies on
      that instead of hard-coding a list of exception OIDs.
      9a915e59
  7. 10 1月, 2010 1 次提交
    • R
      Document pg_tablespace.spcoptions. · 8b9fa7a9
      Robert Haas 提交于
      This should have been part of the original tablespace-options patch, but I
      overlooked the need to update this portion of the documentation.
      8b9fa7a9
  8. 02 1月, 2010 1 次提交
    • T
      Support "x IS NOT NULL" clauses as indexscan conditions. This turns out · 29c4ad98
      Tom Lane 提交于
      to be just a minor extension of the previous patch that made "x IS NULL"
      indexable, because we can treat the IS NOT NULL condition as if it were
      "x < NULL" or "x > NULL" (depending on the index's NULLS FIRST/LAST option),
      just like IS NULL is treated like "x = NULL".  Aside from any possible
      usefulness in its own right, this is an important improvement for
      index-optimized MAX/MIN aggregates: it is now reliably possible to get
      a column's min or max value cheaply, even when there are a lot of nulls
      cluttering the interesting end of the index.
      29c4ad98
  9. 30 12月, 2009 1 次提交
  10. 17 12月, 2009 1 次提交
    • R
      Improve documentation for pg_largeobject changes. · f5fd651e
      Robert Haas 提交于
      Rewrite the documentation in more idiomatic English, and in the process make
      it somewhat more succinct.  Move the discussion of specific large object
      privileges out of the "server-side functions" section, where it certainly
      doesn't belong, and into "implementation features".  That might not be
      exactly right either, but it doesn't seem worth creating a new section for
      this amount of information. Fix a few spelling and layout problems, too.
      f5fd651e
  11. 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
  12. 07 12月, 2009 1 次提交
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. 11 8月, 2009 1 次提交
  19. 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
  20. 03 8月, 2009 1 次提交
  21. 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
  22. 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
  23. 02 7月, 2009 1 次提交
  24. 01 4月, 2009 1 次提交
  25. 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
  26. 24 2月, 2009 1 次提交
  27. 10 2月, 2009 1 次提交
  28. 08 2月, 2009 1 次提交
  29. 07 2月, 2009 1 次提交
  30. 05 2月, 2009 1 次提交
  31. 02 2月, 2009 1 次提交
  32. 27 1月, 2009 1 次提交
  33. 23 1月, 2009 2 次提交
  34. 16 1月, 2009 1 次提交
  35. 09 1月, 2009 2 次提交
  36. 20 12月, 2008 2 次提交