1. 06 Jul, 2009 6 commits
    • Tom Lane's avatar
      Use floor() not rint() when reducing precision of fractional seconds in · 47386fed
      Tom Lane authored
      timestamp_trunc, timestamptz_trunc, and interval_trunc().  This change
      only affects the float-datetime case; the integer-datetime case already
      behaved like truncation instead of rounding.  Per gripe from Mario Splivalo.
      
      This is a pre-existing issue but I'm choosing not to backpatch, because
      it's such a corner case and there have not been prior complaints.  The
      issue is largely moot anyway given the trend towards integer datetimes.
      47386fed
    • Heikki Linnakangas's avatar
      Fix ancient bug in handling of to_char modifier 'TH', when used with HH. · 44886bd8
      Heikki Linnakangas authored
      In what seems like an oversight, we used to treat 'TH' the same as lowercase
      'th', but only with HH/HH12.
      44886bd8
    • Tom Lane's avatar
      Fix set_append_rel_pathlist() to deal intelligently with cases where · 9b27eab7
      Tom Lane authored
      substituting a child rel's output expressions into the appendrel's restriction
      clauses yields a pseudoconstant restriction.  We might be able to skip scanning
      that child rel entirely (if we get constant FALSE), or generate a one-time
      filter.  8.3 more or less accidentally generated plans that weren't completely
      stupid in these cases, but that was only because an extra recursive level of
      subquery_planner() always occurred and allowed const-simplification to happen.
      8.4's ability to pull up appendrel members with non-Var outputs exposes the
      fact that we need to work harder here.  Per gripe from Sergey Burladyan.
      9b27eab7
    • Peter Eisentraut's avatar
      Show definition of index columns in \d on index · bf6570ab
      Peter Eisentraut authored
      This adds a column called "Definition" to the output of psql \d on an
      index, which shows the full expression behind the index column.  For indexes
      on plain columns, this is redundant,  but for expression indexes, this
      reveals the real expression.
      
      Author: Khee Chin <kheechin@gmail.com>
      bf6570ab
    • Tom Lane's avatar
      Per SQL spec (in particular, the grammar in SQL:2008 7.13) we should allow · 869312e6
      Tom Lane authored
      parentheses around the <query expression body> that follows a WITH clause, eg
      	with cte(foo) as ( values(0) ) ((select foo from cte));
      This seems to be just an oversight/thinko in gram.y.  Noted while
      experimenting with bug #4902.
      869312e6
    • Tom Lane's avatar
      Fix handling of changed-Param signaling for CteScan plan nodes. We were using · 9298d2ff
      Tom Lane authored
      the "cteParam" as a proxy for the possibility that the underlying CTE plan
      depends on outer-level variables or Params, but that doesn't work very well
      because it sometimes causes calling subqueries to be treated as SubPlans when
      they could be InitPlans.  This is inefficient and also causes the outright
      failure exhibited in bug #4902.  Instead, leave the cteParam out of it and
      copy the underlying CTE plan's extParams directly.  Per bug #4902 from
      Marko Tiikkaja.
      9298d2ff
  2. 03 Jul, 2009 2 commits
  3. 02 Jul, 2009 3 commits
  4. 01 Jul, 2009 2 commits
  5. 30 Jun, 2009 1 commit
  6. 27 Jun, 2009 2 commits
    • Tom Lane's avatar
      Revert addition of "o" to tar options. This was intended to fix bug #4883, · 4d53a2f9
      Tom Lane authored
      but the cure appears to be worse than the disease.  It turns out that GNU
      tar versions 1.14.x misinterpret -o as --same-owner, not --no-same-owner,
      leading to exactly the wrong behavior for both root and nonroot users.
      While that bug has been fixed for nearly five years, these tar versions
      are still found in the wild, notably in OS X 10.4.  Given that #4883 was
      the first complaint we'd heard, it's definitely not worth fixing at the
      risk of breaking things for other users.  Perhaps revisit at a later date
      when we're not up against a release deadline.
      4d53a2f9
    • Marc G. Fournier's avatar
      · 41f467f3
      Marc G. Fournier authored
      Bundle v8.4.0
      41f467f3
  7. 26 Jun, 2009 7 commits
  8. 25 Jun, 2009 7 commits
  9. 24 Jun, 2009 3 commits
  10. 23 Jun, 2009 4 commits
    • Tom Lane's avatar
      Provide a link to the UPDATE reference page in the 'Updating Data' · d82e9f72
      Tom Lane authored
      section of the docs.  Per suggestion from Brad Bowman.
      d82e9f72
    • Magnus Hagander's avatar
      Properly initialize SSL engines when used from libpq. This is required for · a93e7432
      Magnus Hagander authored
      most external engines.
      
      Per report and initial code from Lars Kanis
      a93e7432
    • Tom Lane's avatar
      Fix an ancient error in dist_ps (distance from point to line segment), which · b087b018
      Tom Lane authored
      a number of other geometric operators also depend on.  It miscalculated the
      slope of the perpendicular to the given line segment anytime that slope was
      other than 0, infinite, or +/-1.  In some cases the error would be masked
      because the true closest point on the line segment was one of its endpoints
      rather than the intersection point, but in other cases it could give an
      arbitrarily bad answer.  Per bug #4872 from Nick Roosevelt.
      
      Bug goes clear back to Berkeley days, so patch all supported branches.
      Make a couple of cosmetic adjustments while at it.
      b087b018
    • Tom Lane's avatar
      Fix the makefiles to fail cleanly if Perl is needed but not present. This · 8d355d7b
      Tom Lane authored
      used to work as intended, but got broken some time ago (a quoted empty string
      is not an empty string), and got broken some more by the changes to generate
      ecpg's preproc.y automatically.  Given all the unprotected uses of $(PERL)
      elsewhere, it seems best to make use of the $(missing) script rather than
      trying to ensure each such use is protected individually.  Also fix various
      bits of documentation that omitted to mention Perl as a requirement for
      building from a CVS pull.  Per a complaint from Robert Haas.
      8d355d7b
  11. 22 Jun, 2009 3 commits
    • Marc G. Fournier's avatar
      · bc00ceb1
      Marc G. Fournier authored
      bundle RC2
      bc00ceb1
    • Tom Lane's avatar
      For bulk write operations (eg COPY IN), use a ring buffer of 16MB instead · 6382448c
      Tom Lane authored
      of the 256KB limit originally enforced by a patch committed 2008-11-06.
      Per recent test results, the smaller size resulted in an undesirable decrease
      in bulk data loading speed, due to COPY processing frequently getting blocked
      for WAL flushing.  This area might need more tweaking later, but this setting
      seems to be good enough for 8.4.
      6382448c
    • Tom Lane's avatar
      Make to_timestamp and friends skip leading spaces before an integer field, · 3f1e529e
      Tom Lane authored
      even when not in FM mode.  This improves compatibility with Oracle and with
      our pre-8.4 behavior, as per bug #4862.
      
      Brendan Jurd
      
      Add a couple of regression test cases for this.  In passing, get rid of the
      labeling of the individual test cases; doesn't seem to be good for anything
      except causing extra work when inserting a test...
      
      Tom Lane
      3f1e529e