Skip to content
Snippets Groups Projects
  1. Sep 04, 2009
  2. Jun 22, 2009
  3. Jun 21, 2009
  4. Jun 20, 2009
  5. Jun 11, 2009
  6. Apr 16, 2009
  7. Apr 09, 2009
  8. Apr 06, 2009
  9. Jan 30, 2009
  10. Jan 01, 2009
  11. Dec 28, 2008
  12. Nov 14, 2008
  13. Nov 12, 2008
  14. Nov 04, 2008
  15. Jul 21, 2008
  16. Jul 16, 2008
  17. May 12, 2008
    • Alvaro Herrera's avatar
      Restructure some header files a bit, in particular heapam.h, by removing some · f8c4d7db
      Alvaro Herrera authored
      unnecessary #include lines in it.  Also, move some tuple routine prototypes and
      macros to htup.h, which allows removal of heapam.h inclusion from some .c
      files.
      
      For this to work, a new header file access/sysattr.h needed to be created,
      initially containing attribute numbers of system columns, for pg_dump usage.
      
      While at it, make contrib ltree, intarray and hstore header files more
      consistent with our header style.
      f8c4d7db
  18. Apr 28, 2008
  19. Apr 12, 2008
    • Tom Lane's avatar
      Fix several datatype input functions that were allowing unused bytes in their · c846f7ca
      Tom Lane authored
      results to contain uninitialized, unpredictable values.  While this was okay
      as far as the datatypes themselves were concerned, it's a problem for the
      parser because occurrences of the "same" literal might not be recognized as
      equal by datumIsEqual (and hence not by equal()).  It seems sufficient to fix
      this in the input functions since the only critical use of equal() is in the
      parser's comparisons of ORDER BY and DISTINCT expressions.
      Per a trouble report from Marc Cousin.
      
      Patch all the way back.  Interestingly, array_in did not have the bug before
      8.2, which may explain why the issue went unnoticed for so long.
      c846f7ca
  20. Mar 25, 2008
    • Tom Lane's avatar
      Simplify and standardize conversions between TEXT datums and ordinary C · 220db7cc
      Tom Lane authored
      strings.  This patch introduces four support functions cstring_to_text,
      cstring_to_text_with_len, text_to_cstring, and text_to_cstring_buffer, and
      two macros CStringGetTextDatum and TextDatumGetCString.  A number of
      existing macros that provided variants on these themes were removed.
      
      Most of the places that need to make such conversions now require just one
      function or macro call, in place of the multiple notational layers that used
      to be needed.  There are no longer any direct calls of textout or textin,
      and we got most of the places that were using handmade conversions via
      memcpy (there may be a few still lurking, though).
      
      This commit doesn't make any serious effort to eliminate transient memory
      leaks caused by detoasting toasted text objects before they reach
      text_to_cstring.  We changed PG_GETARG_TEXT_P to PG_GETARG_TEXT_PP in a few
      places where it was easy, but much more could be done.
      
      Brendan Jurd and Tom Lane
      220db7cc
  21. Feb 29, 2008
  22. Jan 01, 2008
  23. Apr 06, 2007
    • Tom Lane's avatar
      Support varlena fields with single-byte headers and unaligned storage. · 3e23b68d
      Tom Lane authored
      This commit breaks any code that assumes that the mere act of forming a tuple
      (without writing it to disk) does not "toast" any fields.  While all available
      regression tests pass, I'm not totally sure that we've fixed every nook and
      cranny, especially in contrib.
      
      Greg Stark with some help from Tom Lane
      3e23b68d
  24. Mar 28, 2007
    • Tom Lane's avatar
      Fix array coercion expressions to ensure that the correct volatility is · bf940763
      Tom Lane authored
      seen by code inspecting the expression.  The best way to do this seems
      to be to drop the original representation as a function invocation, and
      instead make a special expression node type that represents applying
      the element-type coercion function to each array element.  In this way
      the element function is exposed and will be checked for volatility.
      Per report from Guillaume Smet.
      bf940763
  25. Feb 28, 2007
    • Tom Lane's avatar
      Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, len). · 234a02b2
      Tom Lane authored
      Get rid of VARATT_SIZE and VARATT_DATA, which were simply redundant with
      VARSIZE and VARDATA, and as a consequence almost no code was using the
      longer names.  Rename the length fields of struct varlena and various
      derived structures to catch anyplace that was accessing them directly;
      and clean up various places so caught.  In itself this patch doesn't
      change any behavior at all, but it is necessary infrastructure if we hope
      to play any games with the representation of varlena headers.
      Greg Stark and Tom Lane
      234a02b2
  26. Jan 05, 2007
  27. Nov 08, 2006
  28. Oct 06, 2006
  29. Oct 04, 2006
  30. Sep 29, 2006
    • Tom Lane's avatar
      Allow assignment to array elements not contiguous with those already · 352a56ba
      Tom Lane authored
      present; intervening positions are filled with nulls.  This behavior
      is required by SQL99 but was not implementable before 8.2 due to lack
      of support for nulls in arrays.  I have only made it work for the
      one-dimensional case, which is all that SQL99 requires.  It seems quite
      complex to get it right in higher dimensions, and since we never allowed
      extension at all in higher dimensions, I think that must count as a
      future feature addition not a bug fix.
      352a56ba
  31. Sep 10, 2006
  32. Jul 14, 2006
  33. Jul 11, 2006
  34. Apr 04, 2006
    • Tom Lane's avatar
      Modify all callers of datatype input and receive functions so that if these · 147d4bf3
      Tom Lane authored
      functions are not strict, they will be called (passing a NULL first parameter)
      during any attempt to input a NULL value of their datatype.  Currently, all
      our input functions are strict and so this commit does not change any
      behavior.  However, this will make it possible to build domain input functions
      that centralize checking of domain constraints, thereby closing numerous holes
      in our domain support, as per previous discussion.
      
      While at it, I took the opportunity to introduce convenience functions
      InputFunctionCall, OutputFunctionCall, etc to use in code that calls I/O
      functions.  This eliminates a lot of grotty-looking casts, but the main
      motivation is to make it easier to grep for these places if we ever need
      to touch them again.
      147d4bf3
  35. Mar 05, 2006
  36. Nov 22, 2005
  37. Nov 19, 2005
  38. Nov 17, 2005
    • Tom Lane's avatar
      Make SQL arrays support null elements. This commit fixes the core array · cecb6075
      Tom Lane authored
      functionality, but I still need to make another pass looking at places
      that incidentally use arrays (such as ACL manipulation) to make sure they
      are null-safe.  Contrib needs work too.
      I have not changed the behaviors that are still under discussion about
      array comparison and what to do with lower bounds.
      cecb6075
  39. Oct 15, 2005
  40. Aug 15, 2005
    • Tom Lane's avatar
      array_in() and array_recv() need to be more paranoid about validating · 866ffc2f
      Tom Lane authored
      their OID parameter.  It was possible to crash the backend with
      select array_in('{123}',0,0); because that would bypass the needed step
      of initializing the workspace.  These seem to be the only two places
      with a problem, though (record_in and record_recv don't have the issue,
      and the other array functions aren't depending on user-supplied input).
      Back-patch as far as 7.4; 7.3 does not have the bug.
      866ffc2f
Loading