1. 31 Jan, 2014 8 commits
  2. 30 Jan, 2014 8 commits
    • Tom Lane's avatar
      Fix potential coredump on bad locale value in pg_upgrade. · 41e364ec
      Tom Lane authored
      Thinko in error report (and a typo in the message text, too).  We're
      failing anyway, but it would be good to print something useful first.
      Noted while reviewing a patch to make pg_upgrade's locale code laxer.
      41e364ec
    • Robert Haas's avatar
      Add convenience functions pg_sleep_for and pg_sleep_until. · 760c770f
      Robert Haas authored
      Vik Fearing, reviewed by Pavel Stehule and myself
      760c770f
    • Tom Lane's avatar
      Fix bogus handling of "postponed" lateral quals. · 043f6ff0
      Tom Lane authored
      When pulling a "postponed" qual from a LATERAL subquery up into the quals
      of an outer join, we must make sure that the postponed qual is included
      in those seen by make_outerjoininfo().  Otherwise we might compute a
      too-small min_lefthand or min_righthand for the outer join, leading to
      "JOIN qualification cannot refer to other relations" failures from
      distribute_qual_to_rels.  Subtler errors in the created plan seem possible,
      too, if the extra qual would only affect join ordering constraints.
      
      Per bug #9041 from David Leverton.  Back-patch to 9.3.
      043f6ff0
    • Bruce Momjian's avatar
    • Bruce Momjian's avatar
    • Bruce Momjian's avatar
      docs: add mention of index swapping · b1cbd2b5
      Bruce Momjian authored
      Backpatch to 9.3
      
      Greg Smith
      b1cbd2b5
    • Bruce Momjian's avatar
      Add checks for interval overflow/underflow · 146604ec
      Bruce Momjian authored
      New checks include input, month/day/time internal adjustments, addition,
      subtraction, multiplication, and negation.  Also adjust docs to
      correctly specify interval size in bytes.
      
      Report from Rok Kralj
      146604ec
    • Tom Lane's avatar
      Fix unsafe references to errno within error messaging logic. · 571addd7
      Tom Lane authored
      Various places were supposing that errno could be expected to hold still
      within an ereport() nest or similar contexts.  This isn't true necessarily,
      though in some cases it accidentally failed to fail depending on how the
      compiler chanced to order the subexpressions.  This class of thinko
      explains recent reports of odd failures on clang-built versions, typically
      missing or inappropriate HINT fields in messages.
      
      Problem identified by Christian Kruse, who also submitted the patch this
      commit is based on.  (I fixed a few issues in his patch and found a couple
      of additional places with the same disease.)
      
      Back-patch as appropriate to all supported branches.
      571addd7
  3. 29 Jan, 2014 15 commits
  4. 28 Jan, 2014 9 commits
    • Andrew Dunstan's avatar
      Minor docs fixes for new json functions. · c2099751
      Andrew Dunstan authored
      Thom Brown.
      c2099751
    • Andrew Dunstan's avatar
      Add new make targets check-tests and installcheck-tests. · 7043ac71
      Andrew Dunstan authored
      These do not run any specific schedule of tests, but only those
      specified as part of the invocation, e.g.:
      
          make check-tests TESTS="json jsonb"
      7043ac71
    • Andrew Dunstan's avatar
      New json functions. · 10563990
      Andrew Dunstan authored
      json_build_array() and json_build_object allow for the construction of
      arbitrarily complex json trees. json_object() turns a one or two
      dimensional array, or two separate arrays, into a json_object of
      name/value pairs, similarly to the hstore() function.
      json_object_agg() aggregates its two arguments into a single json object
      as name value pairs.
      
      Catalog version bumped.
      
      Andrew Dunstan, reviewed by Marko Tiikkaja.
      10563990
    • Fujii Masao's avatar
      Add pg_stat_archiver statistics view. · 9132b189
      Fujii Masao authored
      This view shows the statistics about the WAL archiver process's activity.
      
      Gabriele Bartolini, reviewed by Michael Paquier, refactored a bit by me.
      9132b189
    • Tom Lane's avatar
      Update comment. · 98d62c28
      Tom Lane authored
      generate_normalized_query() no longer needs to truncate text, but this
      one comment didn't get the memo.  Per Peter Geoghegan.
      98d62c28
    • Bruce Momjian's avatar
      Revert C comment change in slot_attisnull() · c871e8f5
      Bruce Momjian authored
      Revert 89774b58
      c871e8f5
    • Bruce Momjian's avatar
      Remove orphaned prototype · 051b3341
      Bruce Momjian authored
      Rajeev rastogi
      051b3341
    • Stephen Frost's avatar
      Revert dup2() checking in syslogger.c · aef61bf4
      Stephen Frost authored
      Per the expanded comment-
      
      As we're just trying to reset these to go to DEVNULL, there's not
      much point in checking for failure from the close/dup2 calls here,
      if they fail then presumably the file descriptors are closed and
      any writes will go into the bitbucket anyway.
      
      Pointed out by Tom.
      aef61bf4
    • Tom Lane's avatar
      Log a detail message for auth failures due to missing or expired password. · 64e43c59
      Tom Lane authored
      It's worth distinguishing these cases from run-of-the-mill wrong-password
      problems, since users have been known to waste lots of time pursuing the
      wrong theory about what's failing.  Now, our longstanding policy about how
      to report authentication failures is that we don't really want to tell the
      *client* such things, since that might be giving information to a bad guy.
      But there's nothing wrong with reporting the details to the postmaster log,
      and indeed the comments in this area of the code contemplate that
      interesting details should be so reported.  We just weren't handling these
      particular interesting cases usefully.
      
      To fix, add infrastructure allowing subroutines of ClientAuthentication()
      to return a string to be added to the errdetail_log field of the main
      authentication-failed error report.  We might later want to use this to
      report other subcases of authentication failure the same way, but for the
      moment I just dealt with password cases.
      
      Per discussion of a patch from Josh Drake, though this is not what
      he proposed.
      64e43c59