1. 16 7月, 2009 2 次提交
  2. 15 7月, 2009 3 次提交
    • P
      Rearrangement of the HTML docs build rules · 4ef8dc7a
      Peter Eisentraut 提交于
      Set up proper makefile dependencies in the documentation build rules,
      especially around the HTML/index build.  The problem we've had with all
      previous solutions is that we have used the same file name, such as HTML.index
      or bookindex.sgml, to mean different things at different stages of the build,
      and make can't distinguish that.  The solution here is that the first jade run
      produces HTML.index, but does not require bookindex.sgml at all, and produces
      no other html output (the latter an idea from Alvaro).  The second jade run
      includes bookindex.sgml, but does not recreate HTML.index.  That way, when you
      change an sgml file, jade is run twice and at the end all dependencies are
      satisfied.  Omitting the html output in the first stage also makes the full
      build a lot faster.
      
      When you run one of the print format targets, only the first jade run is run,
      then the print target-specific commands.  If an HTML build has completed
      previously, the first jade run is skipped because the dependencies have
      already been satisfied.
      
      The draft and check targets for quick builds and syntax verification are still
      there.
      4ef8dc7a
    • T
      Remove duplicate definition of TYPECAST token. · 4baaaf7a
      Tom Lane 提交于
      (Apparently, some but not all versions of Bison will warn about this.)
      4baaaf7a
    • T
      Tweak the core scanner so that it can be used by plpgsql too. · 1aa58d3a
      Tom Lane 提交于
      Changes:
      
      Pass in the keyword lookup array instead of having it be hardwired.
      (This incidentally allows elimination of some duplicate coding in ecpg.)
      
      Re-order the token declarations in gram.y so that non-keyword tokens have
      numbers that won't change when keywords are added or removed.
      
      Add ".." and ":=" to the set of tokens recognized by scan.l.  (Since these
      combinations are nowhere legal in core SQL, this does not change anything
      except the precise wording of the error you get when you write this.)
      1aa58d3a
  3. 14 7月, 2009 3 次提交
    • T
      Do a conditional SPI_push/SPI_pop when replanning a query in · 0d4899e4
      Tom Lane 提交于
      RevalidateCachedPlan.  This is to avoid a "SPI_ERROR_CONNECT" failure when
      the planner calls a SPI-using function and we are already inside one.
      The alternative fix is to expect callers of RevalidateCachedPlan to do this,
      which seems likely to result in additional hard-to-detect bugs of omission.
      Per reports from Frank van Vugt and Marek Lewczuk.
      
      Back-patch to 8.3. It's much harder to trigger the bug in 8.3, due to a
      smaller set of cases in which plans can be invalidated, but it could happen.
      (I think perhaps only a SI reset event could make 8.3 fail here, but that's
      certainly within the realm of possibility.)
      0d4899e4
    • B
      vacuumlo query cleanups · 6fafa6a0
      Bruce Momjian 提交于
      No need for VACUUM ANAYZE of newly created/populated temp table, just
      use analyze.
      
      No need to apologize for using subquery in DELETE anymore.
      6fafa6a0
    • P
      Update information schema to SQL:2008 · d1ba2942
      Peter Eisentraut 提交于
       - yes_or_no domain for "boolean" data
       - new columns for VIEWS view
       - slight section renumbering
      d1ba2942
  4. 13 7月, 2009 7 次提交
  5. 12 7月, 2009 2 次提交
  6. 11 7月, 2009 1 次提交
    • T
      Fix set_rel_width() to do something reasonable with non-Var items in a · 014be150
      Tom Lane 提交于
      RelOptInfo targetlist.  It used to be that the only possibility other than
      a Var was a RowExpr representing a whole-row child Var, but as of 8.4's
      expanded ability to flatten appendrel members, we can get arbitrary expressions
      in there.  Use the expression's type info and get_typavgwidth() to produce
      an at-least-marginally-sane result.  Note that get_typavgwidth()'s fallback
      estimate (32 bytes) is the same as what was here before, so there will be
      no behavioral change for RowExprs.  Noted while looking at recent gripe
      about constant quals pushed down to FunctionScan appendrel members ...
      not only were we failing to recognize the constant qual, we were getting
      the width estimate wrong :-(
      014be150
  7. 10 7月, 2009 1 次提交
    • T
      Fix xslt_process() to ensure that it inserts a NULL terminator after the · e7370bab
      Tom Lane 提交于
      last pair of parameter name/value strings, even when there are MAXPARAMS
      of them.  Aboriginal bug in contrib/xml2, noted while studying bug #4912
      (though I'm not sure whether there's something else involved in that
      report).
      
      This might be thought a security issue, since it's a potential backend
      crash; but considering that untrustworthy users shouldn't be allowed
      to get their hands on xslt_process() anyway, it's probably not worth
      getting excited about.
      e7370bab
  8. 09 7月, 2009 3 次提交
  9. 08 7月, 2009 9 次提交
  10. 07 7月, 2009 4 次提交
    • T
      Use floor() not rint() when reducing precision of fractional seconds in · 47386fed
      Tom Lane 提交于
      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
    • H
      Fix ancient bug in handling of to_char modifier 'TH', when used with HH. · 44886bd8
      Heikki Linnakangas 提交于
      In what seems like an oversight, we used to treat 'TH' the same as lowercase
      'th', but only with HH/HH12.
      44886bd8
    • T
      Fix set_append_rel_pathlist() to deal intelligently with cases where · 9b27eab7
      Tom Lane 提交于
      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
    • P
      Show definition of index columns in \d on index · bf6570ab
      Peter Eisentraut 提交于
      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
  11. 06 7月, 2009 2 次提交
    • T
      Per SQL spec (in particular, the grammar in SQL:2008 7.13) we should allow · 869312e6
      Tom Lane 提交于
      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
    • T
      Fix handling of changed-Param signaling for CteScan plan nodes. We were using · 9298d2ff
      Tom Lane 提交于
      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
  12. 04 7月, 2009 2 次提交
  13. 03 7月, 2009 1 次提交