1. 26 Oct, 2010 1 commit
  2. 25 Oct, 2010 7 commits
  3. 24 Oct, 2010 1 commit
  4. 22 Oct, 2010 3 commits
  5. 21 Oct, 2010 2 commits
    • Bruce Momjian's avatar
      71be8db5
    • Tom Lane's avatar
      Improve handling of domains over arrays. · 529cb267
      Tom Lane authored
      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
  6. 20 Oct, 2010 14 commits
  7. 19 Oct, 2010 9 commits
  8. 18 Oct, 2010 3 commits