Skip to content
Snippets Groups Projects
  1. Jul 01, 2015
    • Tom Lane's avatar
      Fix broken link in documentation. · 49946f2b
      Tom Lane authored
      HP's web server has apparently become case-sensitive sometime recently.
      Per bug #13479 from Daniel Abraham.  Corrected link identified by Alvaro.
      49946f2b
  2. Jun 25, 2015
  3. Jun 09, 2015
  4. Jun 01, 2015
  5. May 20, 2015
  6. May 18, 2015
    • Tom Lane's avatar
      Last-minute updates for release notes. · f1946b13
      Tom Lane authored
      Add entries for security issues.
      
      Security: CVE-2015-3165 through CVE-2015-3167
      f1946b13
    • Noah Misch's avatar
      pgcrypto: Report errant decryption as "Wrong key or corrupt data". · 0ba20043
      Noah Misch authored
      This has been the predominant outcome.  When the output of decrypting
      with a wrong key coincidentally resembled an OpenPGP packet header,
      pgcrypto could instead report "Corrupt data", "Not text data" or
      "Unsupported compression algorithm".  The distinct "Corrupt data"
      message added no value.  The latter two error messages misled when the
      decrypted payload also exhibited fundamental integrity problems.  Worse,
      error message variance in other systems has enabled cryptologic attacks;
      see RFC 4880 section "14. Security Considerations".  Whether these
      pgcrypto behaviors are likewise exploitable is unknown.
      
      In passing, document that pgcrypto does not resist side-channel attacks.
      Back-patch to 9.0 (all supported versions).
      
      Security: CVE-2015-3167
      0ba20043
  7. May 17, 2015
  8. May 16, 2015
    • Tom Lane's avatar
      Fix docs typo · 639bf57c
      Tom Lane authored
      I don't think "respectfully" is what was meant here ...
      639bf57c
  9. May 14, 2015
  10. May 09, 2015
    • Stephen Frost's avatar
      Recommend include_realm=1 in docs · 21cb21de
      Stephen Frost authored
      As discussed, the default setting of include_realm=0 can be dangerous in
      multi-realm environments because it is then impossible to differentiate
      users with the same username but who are from two different realms.
      
      Recommend include_realm=1 and note that the default setting may change
      in a future version of PostgreSQL and therefore users may wish to
      explicitly set include_realm to avoid issues while upgrading.
      21cb21de
  11. May 05, 2015
  12. Apr 09, 2015
  13. Apr 06, 2015
  14. Apr 02, 2015
    • Alvaro Herrera's avatar
      psql: fix \connect with URIs and conninfo strings · d4bacdcb
      Alvaro Herrera authored
      psql was already accepting conninfo strings as the first parameter in
      \connect, but the way it worked wasn't sane; some of the other
      parameters would get the previous connection's values, causing it to
      connect to a completely unexpected server or, more likely, not finding
      any server at all because of completely wrong combinations of
      parameters.
      
      Fix by explicitely checking for a conninfo-looking parameter in the
      dbname position; if one is found, use its complete specification rather
      than mix with the other arguments.  Also, change tab-completion to not
      try to complete conninfo/URI-looking "dbnames" and document that
      conninfos are accepted as first argument.
      
      There was a weak consensus to backpatch this, because while the behavior
      of using the dbname as a conninfo is nowhere documented for \connect, it
      is reasonable to expect that it works because it does work in many other
      contexts.  Therefore this is backpatched all the way back to 9.0.
      
      To implement this, routines previously private to libpq have been
      duplicated so that psql can decide what looks like a conninfo/URI
      string.  In back branches, just duplicate the same code all the way back
      to 9.2, where URIs where introduced; 9.0 and 9.1 have a simpler version.
      In master, the routines are moved to src/common and renamed.
      
      Author: David Fetter, Andrew Dunstan.  Some editorialization by me
      (probably earning a Gierth's "Sloppy" badge in the process.)
      Reviewers: Andrew Gierth, Erik Rijkers, Pavel Stěhule, Stephen Frost,
      Robert Haas, Andrew Dunstan.
      d4bacdcb
  15. Apr 01, 2015
  16. Mar 08, 2015
    • Tom Lane's avatar
      Fix documentation for libpq's PQfn(). · ae67e81e
      Tom Lane authored
      The SGML docs claimed that 1-byte integers could be sent or received with
      the "isint" options, but no such behavior has ever been implemented in
      pqGetInt() or pqPutInt().  The in-code documentation header for PQfn() was
      even less in tune with reality, and the code itself used parameter names
      matching neither the SGML docs nor its libpq-fe.h declaration.  Do a bit
      of additional wordsmithing on the SGML docs while at it.
      
      Since the business about 1-byte integers is a clear documentation bug,
      back-patch to all supported branches.
      ae67e81e
  17. Mar 02, 2015
    • Stephen Frost's avatar
      Fix pg_dump handling of extension config tables · d13bbfab
      Stephen Frost authored
      Since 9.1, we've provided extensions with a way to denote
      "configuration" tables- tables created by an extension which the user
      may modify.  By marking these as "configuration" tables, the extension
      is asking for the data in these tables to be pg_dump'd (tables which
      are not marked in this way are assumed to be entirely handled during
      CREATE EXTENSION and are not included at all in a pg_dump).
      
      Unfortunately, pg_dump neglected to consider foreign key relationships
      between extension configuration tables and therefore could end up
      trying to reload the data in an order which would cause FK violations.
      
      This patch teaches pg_dump about these dependencies, so that the data
      dumped out is done so in the best order possible.  Note that there's no
      way to handle circular dependencies, but those have yet to be seen in
      the wild.
      
      The release notes for this should include a caution to users that
      existing pg_dump-based backups may be invalid due to this issue.  The
      data is all there, but restoring from it will require extracting the
      data for the configuration tables and then loading them in the correct
      order by hand.
      
      Discussed initially back in bug #6738, more recently brought up by
      Gilles Darold, who provided an initial patch which was further reworked
      by Michael Paquier.  Further modifications and documentation updates
      by me.
      
      Back-patch to 9.1 where we added the concept of extension configuration
      tables.
      d13bbfab
  18. Feb 23, 2015
    • Heikki Linnakangas's avatar
      Fix potential deadlock with libpq non-blocking mode. · 22c9c8a7
      Heikki Linnakangas authored
      If libpq output buffer is full, pqSendSome() function tries to drain any
      incoming data. This avoids deadlock, if the server e.g. sends a lot of
      NOTICE messages, and blocks until we read them. However, pqSendSome() only
      did that in blocking mode. In non-blocking mode, the deadlock could still
      happen.
      
      To fix, take a two-pronged approach:
      
      1. Change the documentation to instruct that when PQflush() returns 1, you
      should wait for both read- and write-ready, and call PQconsumeInput() if it
      becomes read-ready. That fixes the deadlock, but applications are not going
      to change overnight.
      
      2. In pqSendSome(), drain the input buffer before returning 1. This
      alleviates the problem for applications that only wait for write-ready. In
      particular, a slow but steady stream of NOTICE messages during COPY FROM
      STDIN will no longer cause a deadlock. The risk remains that the server
      attempts to send a large burst of data and fills its output buffer, and at
      the same time the client also sends enough data to fill its output buffer.
      The application will deadlock if it goes to sleep, waiting for the socket
      to become write-ready, before the server's data arrives. In practice,
      NOTICE messages and such that the server might be sending are usually
      short, so it's highly unlikely that the server would fill its output buffer
      so quickly.
      
      Backpatch to all supported versions.
      22c9c8a7
  19. Feb 17, 2015
    • Tom Lane's avatar
      Remove code to match IPv4 pg_hba.conf entries to IPv4-in-IPv6 addresses. · d068609b
      Tom Lane authored
      In investigating yesterday's crash report from Hugo Osvaldo Barrera, I only
      looked back as far as commit f3aec2c7 where the breakage occurred
      (which is why I thought the IPv4-in-IPv6 business was undocumented).  But
      actually the logic dates back to commit 3c9bb888 and was simply
      broken by erroneous refactoring in the later commit.  A bit of archives
      excavation shows that we added the whole business in response to a report
      that some 2003-era Linux kernels would report IPv4 connections as having
      IPv4-in-IPv6 addresses.  The fact that we've had no complaints since 9.0
      seems to be sufficient confirmation that no modern kernels do that, so
      let's just rip it all out rather than trying to fix it.
      
      Do this in the back branches too, thus essentially deciding that our
      effective behavior since 9.0 is correct.  If there are any platforms on
      which the kernel reports IPv4-in-IPv6 addresses as such, yesterday's fix
      would have made for a subtle and potentially security-sensitive change in
      the effective meaning of IPv4 pg_hba.conf entries, which does not seem like
      a good thing to do in minor releases.  So let's let the post-9.0 behavior
      stand, and change the documentation to match it.
      
      In passing, I failed to resist the temptation to wordsmith the description
      of pg_hba.conf IPv4 and IPv6 address entries a bit.  A lot of this text
      hasn't been touched since we were IPv4-only.
      d068609b
  20. Feb 11, 2015
    • Michael Meskes's avatar
      Fixed array handling in ecpg. · 9be9ac42
      Michael Meskes authored
      When ecpg was rewritten to the new protocol version not all variable types
      were corrected. This patch rewrites the code for these types to fix that. It
      also fixes the documentation to correctly tell the status of array handling.
      9be9ac42
  21. Feb 06, 2015
    • Heikki Linnakangas's avatar
      Report WAL flush, not insert, position in replication IDENTIFY_SYSTEM · 2af568c6
      Heikki Linnakangas authored
      When beginning streaming replication, the client usually issues the
      IDENTIFY_SYSTEM command, which used to return the current WAL insert
      position. That's not suitable for the intended purpose of that field,
      however. pg_receivexlog uses it to start replication from the reported
      point, but if it hasn't been flushed to disk yet, it will fail. Change
      IDENTIFY_SYSTEM to report the flush position instead.
      
      Backpatch to 9.1 and above. 9.0 doesn't report any WAL position.
      2af568c6
  22. Feb 02, 2015
  23. Feb 01, 2015
    • Tom Lane's avatar
      9eadf637
    • Tom Lane's avatar
      Fix documentation of psql's ECHO all mode. · ad48256b
      Tom Lane authored
      "ECHO all" is ignored for interactive input, and has been for a very long
      time, though possibly not for as long as the documentation has claimed the
      opposite.  Fix that, and also note that empty lines aren't echoed, which
      while dubious is another longstanding behavior (it's embedded in our
      regression test files for one thing).  Per bug #12721 from Hans Ginzel.
      
      In HEAD, also improve the code comments in this area, and suppress an
      unnecessary fflush(stdout) when we're not echoing.  That would likely
      be safe to back-patch, but I'll not risk it mere hours before a release
      wrap.
      ad48256b
  24. Jan 21, 2015
    • Tom Lane's avatar
      Improve documentation of random() function. · bdde191c
      Tom Lane authored
      Move random() and setseed() to a separate table, to have them grouped
      together. Also add a notice that random() is not cryptographically secure.
      
      Back-patch of commit 75fdcec1 into
      all supported versions, per discussion of the need to document that
      random() is just a wrapper around random(3).
      bdde191c
  25. Jan 06, 2015
  26. Jan 03, 2015
  27. Dec 31, 2014
    • Tom Lane's avatar
      Docs: improve descriptions of ISO week-numbering date features. · daa63068
      Tom Lane authored
      Use the phraseology "ISO 8601 week-numbering year" in place of just
      "ISO year", and make related adjustments to other terminology.
      
      The point of this change is that it seems some people see "ISO year"
      and think "standard year", whereupon they're surprised when constructs
      like to_char(..., "IYYY-MM-DD") produce nonsensical results.  Perhaps
      hanging a few more adjectives on it will discourage them from jumping
      to false conclusions.  I put in an explicit warning against that
      specific usage, too, though the main point is to discourage people
      who haven't read this far down the page.
      
      In passing fix some nearby markup and terminology inconsistencies.
      daa63068
    • Tom Lane's avatar
      Improve consistency of parsing of psql's magic variables. · 64c50653
      Tom Lane authored
      For simple boolean variables such as ON_ERROR_STOP, psql has for a long
      time recognized variant spellings of "on" and "off" (such as "1"/"0"),
      and it also made a point of warning you if you'd misspelled the setting.
      But these conveniences did not exist for other keyword-valued variables.
      In particular, though ECHO_HIDDEN and ON_ERROR_ROLLBACK include "on" and
      "off" as possible values, none of the alternative spellings for those were
      recognized; and to make matters worse the code would just silently assume
      "on" was meant for any unrecognized spelling.  Several people have reported
      getting bitten by this, so let's fix it.  In detail, this patch:
      
      * Allows all spellings recognized by ParseVariableBool() for ECHO_HIDDEN
      and ON_ERROR_ROLLBACK.
      
      * Reports a warning for unrecognized values for COMP_KEYWORD_CASE, ECHO,
      ECHO_HIDDEN, HISTCONTROL, ON_ERROR_ROLLBACK, and VERBOSITY.
      
      * Recognizes all values for all these variables case-insensitively;
      previously there was a mishmash of case-sensitive and case-insensitive
      behaviors.
      
      Back-patch to all supported branches.  There is a small risk of breaking
      existing scripts that were accidentally failing to malfunction; but the
      consensus is that the chance of detecting real problems and preventing
      future mistakes outweighs this.
      64c50653
  28. Dec 29, 2014
    • Tom Lane's avatar
      Assorted minor fixes for psql metacommand docs. · c61e471a
      Tom Lane authored
      Document the long forms of \H \i \ir \o \p \r \w ... apparently, we have
      a long and dishonorable history of leaving out the unabbreviated names of
      psql backslash commands.
      
      Avoid saying "Unix shell"; we can just say "shell" with equal clarity,
      and not leave Windows users wondering whether the feature works for them.
      
      Improve consistency of documentation of \g \o \w metacommands.  There's
      no reason to use slightly different wording or markup for each one.
      c61e471a
  29. Dec 21, 2014
    • Tom Lane's avatar
      Docs: clarify treatment of variadic functions with zero variadic arguments. · ee56e14b
      Tom Lane authored
      Explain that you have to use "VARIADIC ARRAY[]" to pass an empty array
      to a variadic parameter position.  This was already implicit in the text
      but it seems better to spell it out.
      
      Per a suggestion from David Johnston, though I didn't use his proposed
      wording.  Back-patch to all supported branches.
      ee56e14b
  30. Dec 18, 2014
    • Tom Lane's avatar
      Improve documentation about CASE and constant subexpressions. · 3dd740b3
      Tom Lane authored
      The possibility that constant subexpressions of a CASE might be evaluated
      at planning time was touched on in 9.17.1 (CASE expressions), but it really
      ought to be explained in 4.2.14 (Expression Evaluation Rules) which is the
      primary discussion of such topics.  Add text and an example there, and
      revise the <note> under CASE to link there.
      
      Back-patch to all supported branches, since it's acted like this for a
      long time (though 9.2+ is probably worse because of its more aggressive
      use of constant-folding via replanning of nominally-prepared statements).
      Pre-9.4, also back-patch text added in commit 0ce627d4 about CASE versus
      aggregate functions.
      
      Tom Lane and David Johnston, per discussion of bug #12273.
      3dd740b3
    • Noah Misch's avatar
      Lock down regression testing temporary clusters on Windows. · 0046f651
      Noah Misch authored
      Use SSPI authentication to allow connections exclusively from the OS
      user that launched the test suite.  This closes on Windows the
      vulnerability that commit be76a6d3
      closed on other platforms.  Users of "make installcheck" or custom test
      harnesses can run "pg_regress --config-auth=DATADIR" to activate the
      same authentication configuration that "make check" would use.
      Back-patch to 9.0 (all supported versions).
      
      Security: CVE-2014-0067
      0046f651
  31. Nov 25, 2014
    • Heikki Linnakangas's avatar
      Allow "dbname" from connection string to be overridden in PQconnectDBParams · 9b468bce
      Heikki Linnakangas authored
      If the "dbname" attribute in PQconnectDBParams contained a connection string
      or URI (and expand_dbname = TRUE), the database name from the connection
      string could not be overridden by a subsequent "dbname" keyword in the
      array. That was not intentional; all other options can be overridden.
      Furthermore, any subsequent "dbname" caused the connection string from the
      first dbname value to be processed again, overriding any values for the same
      options that were given between the connection string and the second dbname
      option.
      
      In the passing, clarify in the docs that only the first dbname option in the
      array is parsed as a connection string.
      
      Alex Shulgin. Backpatch to all supported versions.
      9b468bce
  32. Nov 19, 2014
    • Tom Lane's avatar
      Improve documentation's description of JOIN clauses. · d767aa51
      Tom Lane authored
      In bug #12000, Andreas Kunert complained that the documentation was
      misleading in saying "FROM T1 CROSS JOIN T2 is equivalent to FROM T1, T2".
      That's correct as far as it goes, but the equivalence doesn't hold when
      you consider three or more tables, since JOIN binds more tightly than
      comma.  I added a <note> to explain this, and ended up rearranging some
      of the existing text so that the note would make sense in context.
      
      In passing, rewrite the description of JOIN USING, which was unnecessarily
      vague, and hadn't been helped any by somebody's reliance on markup as a
      substitute for clear writing.  (Mostly this involved reintroducing a
      concrete example that was unaccountably removed by commit 032f3b7e.)
      
      Back-patch to all supported branches.
      d767aa51
  33. Nov 03, 2014
    • Tom Lane's avatar
      Docs: fix incorrect spelling of contrib/pgcrypto option. · 2c2c1e8b
      Tom Lane authored
      pgp_sym_encrypt's option is spelled "sess-key", not "enable-session-key".
      Spotted by Jeff Janes.
      
      In passing, improve a comment in pgp-pgsql.c to make it clearer that
      the debugging options are intentionally undocumented.
      2c2c1e8b
  34. Nov 01, 2014
Loading