1. 25 Mar, 2007 4 commits
    • Tom Lane's avatar
      Remove the prohibition on executing cursor commands through SPI_execute. · bf823652
      Tom Lane authored
      Vadim had included this restriction in the original design of the SPI code,
      but I'm darned if I can see a reason for it.
      
      I left the macro definition of SPI_ERROR_CURSOR in place, so as not to
      needlessly break any SPI callers that are checking for it, but that code
      will never actually be returned anymore.
      bf823652
    • Tom Lane's avatar
      Clean up the representation of special snapshots by including a "method · e85a01df
      Tom Lane authored
      pointer" in every Snapshot struct.  This allows removal of the case-by-case
      tests in HeapTupleSatisfiesVisibility, which should make it a bit faster
      (I didn't try any performance tests though).  More importantly, we are no
      longer violating portable C practices by assuming that small integers are
      distinct from all pointer values, and HeapTupleSatisfiesDirty no longer
      has a non-reentrant API involving side-effects on a global variable.
      
      There were a couple of places calling HeapTupleSatisfiesXXX routines
      directly rather than through the HeapTupleSatisfiesVisibility macro.
      Since these places had to be changed anyway, I chose to make them go
      through the macro for uniformity.
      
      Along the way I renamed HeapTupleSatisfiesSnapshot to HeapTupleSatisfiesMVCC
      to emphasize that it's only used with MVCC-type snapshots.  I was sorely
      tempted to rename HeapTupleSatisfiesVisibility to HeapTupleSatisfiesSnapshot,
      but forebore for the moment to avoid confusion and reduce the likelihood that
      this patch breaks some of the pending patches.  Might want to reconsider
      doing that later.
      e85a01df
    • Tatsuo Ishii's avatar
      Add new encoding EUC_JIS_2004 and SHIFT_JIS_2004, · 75c6519f
      Tatsuo Ishii authored
      along with new conversions among EUC_JIS_2004, SHIFT_JIS_2004 and UTF-8.
      catalog version has been bump up.
      75c6519f
    • Bruce Momjian's avatar
      Add: · 7b4726e6
      Bruce Momjian authored
      >
      > * Allow BEFORE INSERT triggers on views
      >
      >   http://archives.postgresql.org/pgsql-general/2007-02/msg01466.php
      7b4726e6
  2. 24 Mar, 2007 5 commits
  3. 23 Mar, 2007 13 commits
  4. 22 Mar, 2007 15 commits
  5. 21 Mar, 2007 3 commits
    • Tom Lane's avatar
      Fix some problems with selectivity estimation for partial indexes. · 54d20024
      Tom Lane authored
      First, genericcostestimate() was being way too liberal about including
      partial-index conditions in its selectivity estimate, resulting in
      substantial underestimates for situations such as an indexqual "x = 42"
      used with an index on x "WHERE x >= 40 AND x < 50".  While the code is
      intentionally set up to favor selecting partial indexes when available,
      this was too much...
      
      Second, choose_bitmap_and() was likewise easily fooled by cases of this
      type, since it would similarly think that the partial index had selectivity
      independent of the indexqual.
      
      Fixed by using predicate_implied_by() rather than simple equality checks
      to determine redundancy.  This is a good deal more expensive but I don't
      see much alternative.  At least the extra cost is only paid when there's
      actually a partial index under consideration.
      
      Per report from Jeff Davis.  I'm not going to risk back-patching this,
      though.
      54d20024
    • Bruce Momjian's avatar
      Add: · 2b49e5d3
      Bruce Momjian authored
      <
      <
      > 	o During index creation, pre-sort the tuples to improve build speed
      >
      > 	  http://archives.postgresql.org/pgsql-hackers/2007-03/msg01199.php
      >
      2b49e5d3
    • Bruce Momjian's avatar
      Remove TODO item, not wanted: · 5fc7ba76
      Bruce Momjian authored
      < * Add NUMERIC division operator that doesn't round?
      <
      <   Currently NUMERIC _rounds_ the result to the specified precision.
      <   This means division can return a result that multiplied by the
      <   divisor is greater than the dividend, e.g. this returns a value > 10:
      <
      <     SELECT (10::numeric(2,0) / 6::numeric(2,0))::numeric(2,0) * 6;
      <
      <   The positive modulus result returned by NUMERICs might be considered
      <   inaccurate, in one sense.
      <
      5fc7ba76