1. 16 8月, 2005 1 次提交
    • T
      Allow the pgstat views to show toast tables as well as regular tables · 87808aef
      Tom Lane 提交于
      (the stats system has always collected this info, but the views were
      filtering it out).  Modify autovacuum so that over-threshold activity
      in a toast table can trigger a VACUUM of the parent table, even if the
      parent didn't appear to need vacuuming itself.  Per discussion a month
      or so back about "short, wide tables".
      87808aef
  2. 15 8月, 2005 1 次提交
  3. 04 8月, 2005 1 次提交
    • T
      ALTER TABLE OWNER must change the ownership of the table's rowtype too. · 33f5bf97
      Tom Lane 提交于
      This was not especially critical before, but it is now that we track
      ownership dependencies --- the dependency for the rowtype *must* shift
      to the new owner.  Spotted by Bernd Helmle.
      Also fix a problem introduced by recent change to allow non-superusers
      to do ALTER OWNER in some cases: if the table had a toast table, ALTER
      OWNER failed *even for superusers*, because the test being applied would
      conclude that the new would-be owner had no create rights on pg_toast.
      A side-effect of the fix is to disallow changing the ownership of indexes
      or toast tables separately from their parent table, which seems a good
      idea on the whole.
      33f5bf97
  4. 01 8月, 2005 2 次提交
  5. 30 7月, 2005 1 次提交
  6. 28 7月, 2005 1 次提交
  7. 27 7月, 2005 1 次提交
    • T
      Add a role property 'rolinherit' which, when false, denotes that the role · af019fb9
      Tom Lane 提交于
      doesn't automatically inherit the privileges of roles it is a member of;
      for such a role, membership in another role can be exploited only by doing
      explicit SET ROLE.  The default inherit setting is TRUE, so by default
      the behavior doesn't change, but creating a user with NOINHERIT gives closer
      adherence to our current reading of SQL99.  Documentation still lacking,
      and I think the information schema needs another look.
      af019fb9
  8. 25 7月, 2005 2 次提交
  9. 24 7月, 2005 1 次提交
  10. 23 7月, 2005 2 次提交
    • T
      In the stats test, delay for the stats collector to catch up using a · 6c61b0d9
      Tom Lane 提交于
      function that actually sleeps, instead of busy-waiting.  Perhaps this
      will resolve some of the intermittent stats failures we keep seeing.
      6c61b0d9
    • T
      Fix compare_fuzzy_path_costs() to behave a bit more sanely. The original · 37c443ee
      Tom Lane 提交于
      coding would ignore startup cost differences of less than 1% of the
      estimated total cost; which was OK for normal planning but highly not OK
      if a very small LIMIT was applied afterwards, so that startup cost becomes
      the name of the game.  Instead, compare startup and total costs fuzzily
      but independently.  This changes the plan selected for two queries in the
      regression tests; adjust expected-output files for resulting changes in
      row order.  Per reports from Dawid Kuroczko and Sam Mason.
      37c443ee
  11. 21 7月, 2005 1 次提交
    • B
      Add 'day' field to INTERVAL so 1 day interval can be distinguished from · db05f4a7
      Bruce Momjian 提交于
      24 hours. This is very helpful for daylight savings time:
      
      	select '2005-05-03 00:00:00 EST'::timestamp with time zone + '24 hours';
      	      ?column?
      	----------------------
      	2005-05-04 01:00:00-04
      
      	select '2005-05-03 00:00:00 EST'::timestamp with time zone + '1 day';
      	      ?column?
      	----------------------
      	2005-05-04 01:00:00-04
      
      Michael Glaesemann
      db05f4a7
  12. 18 7月, 2005 1 次提交
  13. 16 7月, 2005 1 次提交
  14. 14 7月, 2005 1 次提交
  15. 11 7月, 2005 1 次提交
    • T
      Change typreceive function API so that receive functions get the same · d78397d3
      Tom Lane 提交于
      optional arguments as text input functions, ie, typioparam OID and
      atttypmod.  Make all the datatypes that use typmod enforce it the same
      way in typreceive as they do in typinput.  This fixes a problem with
      failure to enforce length restrictions during COPY FROM BINARY.
      d78397d3
  16. 10 7月, 2005 1 次提交
    • B
      I made the patch that implements regexp_replace again. · 75a64eeb
      Bruce Momjian 提交于
      The specification of this function is as follows.
      
      regexp_replace(source text, pattern text, replacement text, [flags
      text])
      returns text
      
      Replace string that matches to regular expression in source text to
      replacement text.
      
       - pattern is regular expression pattern.
       - replacement is replace string that can use '\1'-'\9', and '\&'.
          '\1'-'\9': back reference to the n'th subexpression.
          '\&'     : entire matched string.
       - flags can use the following values:
          g: global (replace all)
          i: ignore case
          When the flags is not specified, case sensitive, replace the first
          instance only.
      
      Atsushi Ogawa
      75a64eeb
  17. 08 7月, 2005 1 次提交
  18. 02 7月, 2005 4 次提交
  19. 29 6月, 2005 1 次提交
    • T
      Bring syntax of role-related commands into SQL compliance. To avoid · 0eaa36a1
      Tom Lane 提交于
      syntactic conflicts, both privilege and role GRANT/REVOKE commands have
      to use the same production for scanning the list of tokens that might
      eventually turn out to be privileges or role names.  So, change the
      existing GRANT/REVOKE code to expect a list of strings not pre-reduced
      AclMode values.  Fix a couple other minor issues while at it, such as
      InitializeAcl function name conflicting with a Windows system function.
      0eaa36a1
  20. 28 6月, 2005 1 次提交
    • T
      Replace pg_shadow and pg_group by new role-capable catalogs pg_authid · 7762619e
      Tom Lane 提交于
      and pg_auth_members.  There are still many loose ends to finish in this
      patch (no documentation, no regression tests, no pg_dump support for
      instance).  But I'm going to commit it now anyway so that Alvaro can
      make some progress on shared dependencies.  The catalog changes should
      be pretty much done.
      7762619e
  21. 27 6月, 2005 1 次提交
  22. 26 6月, 2005 2 次提交
  23. 25 6月, 2005 1 次提交
    • T
      Extend r-tree operator classes to handle Y-direction tests equivalent · b90f8f20
      Tom Lane 提交于
      to the existing X-direction tests.  An rtree class now includes 4 actual
      2-D tests, 4 1-D X-direction tests, and 4 1-D Y-direction tests.
      This involved adding four new Y-direction test operators for each of
      box and polygon; I followed the PostGIS project's lead as to the names
      of these operators.
      NON BACKWARDS COMPATIBLE CHANGE: the poly_overleft (&<) and poly_overright
      (&>) operators now have semantics comparable to box_overleft and box_overright.
      This is necessary to make r-tree indexes work correctly on polygons.
      Also, I changed circle_left and circle_right to agree with box_left and
      box_right --- formerly they allowed the boundaries to touch.  This isn't
      actually essential given the lack of any r-tree opclass for circles, but
      it seems best to sync all the definitions while we are at it.
      b90f8f20
  24. 22 6月, 2005 2 次提交
  25. 21 6月, 2005 1 次提交
    • T
      Cause initdb to create a third standard database "postgres", which · 6f7fc0ba
      Tom Lane 提交于
      unlike template0 and template1 does not have any special status in
      terms of backend functionality.  However, all external utilities such
      as createuser and createdb now connect to "postgres" instead of
      template1, and the documentation is changed to encourage people to use
      "postgres" instead of template1 as a play area.  This should fix some
      longstanding gotchas involving unexpected propagation of database
      objects by createdb (when you used template1 without understanding
      the implications), as well as ameliorating the problem that CREATE
      DATABASE is unhappy if anyone else is connected to template1.
      Patch by Dave Page, minor editing by Tom Lane.  All per recent
      pghackers discussions.
      6f7fc0ba
  26. 20 6月, 2005 1 次提交
  27. 19 6月, 2005 1 次提交
    • T
      Add a time-of-preparation column to the pg_prepared_xacts view, per an · a8d1075f
      Tom Lane 提交于
      old suggestion by Oliver Jowett.  Also, add a transaction column to the
      pg_locks view to show the xid of each transaction holding or awaiting
      locks; this allows prepared transactions to be properly associated with
      the locks they own.  There was already a column named 'transaction',
      and I chose to rename it to 'transactionid' --- since this column is
      new in the current devel cycle there should be no backwards compatibility
      issue to worry about.
      a8d1075f
  28. 18 6月, 2005 1 次提交
  29. 14 6月, 2005 1 次提交
  30. 11 6月, 2005 1 次提交
    • N
      Implement two new special variables in PL/PgSQL: SQLSTATE and SQLERRM. · d46bc444
      Neil Conway 提交于
      These contain the SQLSTATE and error message of the current exception,
      respectively. They are scope-local variables that are only defined
      in exception handlers (so attempting to reference them outside an
      exception handler is an error). Update the regression tests and the
      documentation.
      
      Also, do some minor related cleanup: export an unpack_sql_state()
      function from the backend and use it to unpack a SQLSTATE into a
      string, and add a free_var() function to pl_exec.c
      
      Original patch from Pavel Stehule, review by Neil Conway.
      d46bc444
  31. 09 6月, 2005 1 次提交
    • T
      Remove grammar productions for prefix and postfix % and ^ operators, · 77c168a8
      Tom Lane 提交于
      as well as the existing pg_catalog entries for prefix and postfix %.
      These have never been documented, though they did appear in one old
      regression test.  This avoids surprising behavior in cases like
      "SELECT -25 % -10".  Per recent discussion.
      Note: although there is a catalog change here, I did not force initdb
      since there's no harm in leaving the inaccessible entries in one's
      copy of pg_operator.
      77c168a8
  32. 07 6月, 2005 1 次提交