1. 22 10月, 2010 1 次提交
    • T
      Improve handling of domains over arrays. · 529cb267
      Tom Lane 提交于
      This patch eliminates various bizarre behaviors caused by sloppy thinking
      about the difference between a domain type and its underlying array type.
      In particular, the operation of updating one element of such an array
      has to be considered as yielding a value of the underlying array type,
      *not* a value of the domain, because there's no assurance that the
      domain's CHECK constraints are still satisfied.  If we're intending to
      store the result back into a domain column, we have to re-cast to the
      domain type so that constraints are re-checked.
      
      For similar reasons, such a domain can't be blindly matched to an ANYARRAY
      polymorphic parameter, because the polymorphic function is likely to apply
      array-ish operations that could invalidate the domain constraints.  For the
      moment, we just forbid such matching.  We might later wish to insert an
      automatic downcast to the underlying array type, but such a change should
      also change matching of domains to ANYELEMENT for consistency.
      
      To ensure that all such logic is rechecked, this patch removes the original
      hack of setting a domain's pg_type.typelem field to match its base type;
      the typelem will always be zero instead.  In those places where it's really
      okay to look through the domain type with no other logic changes, use the
      newly added get_base_element_type function in place of get_element_type.
      catversion bumped due to change in pg_type contents.
      
      Per bug #5717 from Richard Huxton and subsequent discussion.
      529cb267
  2. 21 10月, 2010 4 次提交
  3. 20 10月, 2010 13 次提交
  4. 19 10月, 2010 9 次提交
  5. 18 10月, 2010 2 次提交
    • T
      Fix a passel of inappropriately-named global functions in GIN. · 419d2374
      Tom Lane 提交于
      The GIN code has absolutely no business exporting GIN-specific functions
      with names as generic as compareItemPointers() or newScanKey(); that's
      just trouble waiting to happen.  I got annoyed about this again just now
      and decided to fix it.  This commit ensures that all global symbols
      defined in access/gin/ have names including "gin" or "Gin".  There were a
      couple of cases, like names involving "PostingItem", where arguably the
      names were already sufficiently nongeneric; but I figured as long as I was
      risking creating merge problems for unapplied GIN patches I might as well
      impose a uniform policy.
      
      I didn't touch any static symbol names.  There might be some places
      where it'd be appropriate to rename some static functions to match
      siblings that are exported, but I'll leave that for another time.
      419d2374
    • T
      Improve GIN indexscan cost estimation. · 48c7d9f6
      Tom Lane 提交于
      The better estimate requires more statistics than we previously stored:
      in particular, counts of "entry" versus "data" pages within the index,
      as well as knowledge of the number of distinct key values.  We collect
      this information during initial index build and update it during VACUUM,
      storing the info in new fields on the index metapage.  No initdb is
      required because these fields will read as zeroes in a pre-existing
      index, and the new gincostestimate code is coded to behave (reasonably)
      sanely if they are zeroes.
      
      Teodor Sigaev, reviewed by Jan Urbanski, Tom Lane, and Itagaki Takahiro.
      48c7d9f6
  6. 17 10月, 2010 1 次提交
    • M
      Fix msvc build for localized versions of Visual C++ · cd0e8253
      Magnus Hagander 提交于
      Look only at the non-localized part of the output from "vcbuild /?",
      which is used to determine the version of Visual Studio in use. Different
      languages seem to localize different amounts of the string, but we assume
      the part "Microsoft Visual C++" won't be modified.
      cd0e8253
  7. 16 10月, 2010 7 次提交
  8. 15 10月, 2010 3 次提交