1. 02 8月, 2011 1 次提交
  2. 01 8月, 2011 1 次提交
  3. 31 7月, 2011 1 次提交
  4. 30 7月, 2011 3 次提交
  5. 29 7月, 2011 1 次提交
    • T
      Fix pg_restore's direct-to-database mode for standard_conforming_strings. · 6545a901
      Tom Lane 提交于
      pg_backup_db.c contained a mini SQL lexer with which it tried to identify
      boundaries between SQL commands, but that code was not designed to cope
      with standard_conforming_strings, and would get the wrong answer if a
      backslash immediately precedes a closing single quote in such a string,
      as per report from Julian Mehnle.  The bug only affects direct-to-database
      restores from archive files made with standard_conforming_strings = on.
      
      Rather than complicating the code some more to try to fix that, let's just
      rip it all out.  The only reason it was needed was to cope with COPY data
      embedded into ordinary archive entries, which was a layout that was used
      only for about the first three weeks of the archive format's existence,
      and never in any production release of pg_dump.  Instead, just rely on the
      archive file layout to tell us whether we're printing COPY data or not.
      
      This bug represents a data corruption hazard in all releases in which
      standard_conforming_strings can be turned on, ie 8.2 and later, so
      back-patch to all supported branches.
      6545a901
  6. 28 7月, 2011 1 次提交
  7. 27 7月, 2011 4 次提交
  8. 26 7月, 2011 4 次提交
  9. 25 7月, 2011 7 次提交
  10. 24 7月, 2011 4 次提交
  11. 23 7月, 2011 1 次提交
    • R
      Unbreak unlogged tables. · 6f1be5a6
      Robert Haas 提交于
      I broke this in commit 5da79169, which
      was obviously insufficiently well tested.  Add some regression tests
      in the hope of making future slip-ups more likely to be noticed.
      6f1be5a6
  12. 22 7月, 2011 2 次提交
    • B
      In pg_upgrade, add C comment about why we don't try to do shared file · 43aa40e1
      Bruce Momjian 提交于
      writes for logging.
      43aa40e1
    • T
      Fix PQsetvalue() to avoid possible crash when adding a new tuple. · a9f0dbc3
      Tom Lane 提交于
      PQsetvalue unnecessarily duplicated the logic in pqAddTuple, and didn't
      duplicate it exactly either --- pqAddTuple does not care what is in the
      tuple-pointer array positions beyond the last valid entry, whereas the
      code in PQsetvalue assumed such positions would contain NULL.  This led
      to possible crashes if PQsetvalue was applied to a PGresult that had
      previously been enlarged with pqAddTuple, for instance one built from a
      server query.  Fix by relying on pqAddTuple instead of duplicating logic,
      and not assuming anything about the contents of res->tuples[res->ntups].
      
      Back-patch to 8.4, where PQsetvalue was introduced.
      
      Andrew Chernow
      a9f0dbc3
  13. 21 7月, 2011 6 次提交
    • T
      Make xpath() do something useful with XPath expressions that return scalars. · 0ce7676a
      Tom Lane 提交于
      Previously, xpath() simply returned an empty array if the expression did
      not yield a node set.  This is useless for expressions that return scalars,
      such as one with name() at the top level.  Arrange to return the scalar
      value as a single-element xml array, instead.  (String values will be
      suitably escaped.)
      
      This change will also cause xpath_exists() to return true, not false,
      for such expressions.
      
      Florian Pflug, reviewed by Radoslaw Smogura
      0ce7676a
    • T
      Ensure that xpath() escapes special characters in string values. · aaf15e5c
      Tom Lane 提交于
      Without this it's possible for the output to not be legal XML, as
      illustrated by the added regression test cases.
      
      NB: this change will need to be called out as an incompatibility in the
      9.2 release notes, since it's possible somebody was relying on the old
      behavior, even though it's clearly wrong.
      
      Florian Pflug, reviewed by Radoslaw Smogura
      aaf15e5c
    • B
      In pg_upgrade, fix the -l/log option to work on Windows. · 17a16eeb
      Bruce Momjian 提交于
      Also, double-quote the log file name in all places, to allow (on all
      platforms) log file names with spaces.
      
      Back patch to 9.0 and 9.1.
      17a16eeb
    • B
      In pg_upgrade, use pg_strudup(), for consistency. · 6b43fdde
      Bruce Momjian 提交于
      6b43fdde
    • R
      Support SECURITY LABEL on databases, tablespaces, and roles. · 463f2625
      Robert Haas 提交于
      This requires a new shared catalog, pg_shseclabel.
      
      Along the way, fix the security_label regression tests so that they
      don't monkey with the labels of any pre-existing objects.  This is
      unlikely to matter in practice, since only the label for the "dummy"
      provider was being manipulated.  But this way still seems cleaner.
      
      KaiGai Kohei, with fairly extensive hacking by me.
      463f2625
    • T
      Rewrite libxml error handling to be more robust. · cacd42d6
      Tom Lane 提交于
      libxml reports some errors (like invalid xmlns attributes) via the error
      handler hook, but still returns a success indicator to the library caller.
      This causes us to miss some errors that are important to report.  Since the
      "generic" error handler hook doesn't know whether the message it's getting
      is for an error, warning, or notice, stop using that and instead start
      using the "structured" error handler hook, which gets enough information
      to be useful.
      
      While at it, arrange to save and restore the error handler hook setting in
      each libxml-using function, rather than assuming we can set and forget the
      hook.  This should improve the odds of working nicely with third-party
      libraries that also use libxml.
      
      In passing, volatile-ize some local variables that get modified within
      PG_TRY blocks.  I noticed this while testing with an older gcc version
      than I'd previously tried to compile xml.c with.
      
      Florian Pflug and Tom Lane, with extensive review/testing by Noah Misch
      cacd42d6
  14. 20 7月, 2011 4 次提交
    • R
      Improve sepgsql and SECURITY LABEL documentation. · d79a601f
      Robert Haas 提交于
      KaiGai Kohei, based on feedback from Yeb Havinga, with some
      corrections by me.
      d79a601f
    • R
      Minor improvement to pg_seclabel documentation. · 550cd074
      Robert Haas 提交于
      This is a bit more consistent with the way pg_description is
      documented, and also include a useful cross-link.
      550cd074
    • A
      Make isolationtester more robust on locked commands · c8dfc892
      Alvaro Herrera 提交于
      Noah Misch diagnosed the buildfarm problems in the isolation tests
      partly as failure to differentiate backends properly; the old code was
      using backend IDs, which is not good enough because a new backend might
      use an already used ID.  Use PIDs instead.
      
      Also, the code was purposely careless about other concurrent activity,
      because it isn't expected; and in fact, it doesn't affect the vast
      majority of the time.  However, it can be observed that autovacuum can
      block tables for long enough to cause sporadic failures.  The new code
      accounts for that by ignoring locks held by processes not explicitly
      declared in our spec file.
      
      Author: Noah Misch
      c8dfc892
    • A
      Increase deadlock_timeout to 100ms in FK isolation tests · d6db0e4e
      Alvaro Herrera 提交于
      The previous value of 20ms is dangerously close to the time actually
      spent just waiting for the deadlock to happen, so on occasion it causes
      the test to fail simply because the other session didn't get to run
      early enough, not managing to cause the deadlock that needs to be
      detected.  With this new value, it's expected that most machines on
      normal load will be able to pass the test.
      
      Author: Noah Misch
      d6db0e4e