Skip to content
Snippets Groups Projects
  1. Mar 04, 2009
  2. Feb 18, 2009
    • Tom Lane's avatar
      Remove the special cases to prevent minus-zero results in float4 and float8 · 86ffdcad
      Tom Lane authored
      unary minus operators.  We weren't attempting to prevent minus zero anywhere
      else; in view of our gradual trend to make the float datatypes more IEEE
      standard compliant, we should allow minus zero here rather than disallow it
      elsewhere.
      
      We don't, however, expect that all platforms will produce minus zero, so
      we need to adjust the one affected regression test to allow both results.
      
      Per discussion of bug #4660.
      
      (In passing, clean up a couple other minor infelicities in float.c.)
      86ffdcad
  3. Jan 01, 2009
  4. Dec 28, 2008
  5. May 09, 2008
  6. Apr 21, 2008
    • Tom Lane's avatar
      Allow float8, int8, and related datatypes to be passed by value on machines · 8472bf7a
      Tom Lane authored
      where Datum is 8 bytes wide.  Since this will break old-style C functions
      (those still using version 0 calling convention) that have arguments or
      results of these types, provide a configure option to disable it and retain
      the old pass-by-reference behavior.  Likewise, provide a configure option
      to disable the recently-committed float4 pass-by-value change.
      
      Zoltan Boszormenyi, plus configurability stuff by me.
      8472bf7a
  7. Mar 10, 2008
  8. Jan 01, 2008
  9. Nov 15, 2007
  10. Sep 20, 2007
  11. Jun 05, 2007
    • Tom Lane's avatar
      Downgrade implicit casts to text to be assignment-only, except for the ones · 31edbadf
      Tom Lane authored
      from the other string-category types; this eliminates a lot of surprising
      interpretations that the parser could formerly make when there was no directly
      applicable operator.
      
      Create a general mechanism that supports casts to and from the standard string
      types (text,varchar,bpchar) for *every* datatype, by invoking the datatype's
      I/O functions.  These new casts are assignment-only in the to-string direction,
      explicit-only in the other, and therefore should create no surprising behavior.
      Remove a bunch of thereby-obsoleted datatype-specific casting functions.
      
      The "general mechanism" is a new expression node type CoerceViaIO that can
      actually convert between *any* two datatypes if their external text
      representations are compatible.  This is more general than needed for the
      immediate feature, but might be useful in plpgsql or other places in future.
      
      This commit does nothing about the issue that applying the concatenation
      operator || to non-text types will now fail, often with strange error messages
      due to misinterpreting the operator as array concatenation.  Since it often
      (not always) worked before, we should either make it succeed or at least give
      a more user-friendly error; but details are still under debate.
      
      Peter Eisentraut and Tom Lane
      31edbadf
  12. 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
  13. Jan 20, 2007
  14. Jan 16, 2007
    • Neil Conway's avatar
      Implement width_bucket() for the float8 data type. · cf57ef4e
      Neil Conway authored
      The implementation is somewhat ugly logic-wise, but I don't see an
      easy way to make it more concise.
      
      When writing this, I noticed that my previous implementation of
      width_bucket() doesn't handle NaN correctly:
      
          postgres=# select width_bucket('NaN', 1, 5, 5);
           width_bucket
          --------------
                      6
          (1 row)
      
      AFAICS SQL:2003 does not define a NaN value, so it doesn't address how
      width_bucket() should behave here. The patch changes width_bucket() so
      that ereport(ERROR) is raised if NaN is specified for the operand or the
      lower or upper bounds to width_bucket(). For float8, NaN is disallowed
      for any of the floating-point inputs, and +/- infinity is disallowed
      for the histogram bounds (but allowed for the operand).
      
      Update docs and regression tests, bump the catversion.
      cf57ef4e
  15. Jan 06, 2007
  16. Jan 05, 2007
  17. Jan 04, 2007
  18. Jan 03, 2007
  19. Jan 02, 2007
  20. Dec 23, 2006
  21. Oct 05, 2006
  22. Oct 04, 2006
  23. Jul 28, 2006
  24. Jul 14, 2006
  25. Jun 08, 2006
    • Bruce Momjian's avatar
      Prepare code to be built by MSVC: · 399a36a7
      Bruce Momjian authored
      	o  remove many WIN32_CLIENT_ONLY defines
      	o  add WIN32_ONLY_COMPILER define
      	o  add 3rd argument to open() for portability
      	o  add include/port/win32_msvc directory for
      	   system includes
      
      Magnus Hagander
      399a36a7
  26. Apr 24, 2006
  27. Mar 11, 2006
  28. Mar 10, 2006
    • Neil Conway's avatar
      Implement 4 new aggregate functions from SQL2003. Specifically: var_pop(), · 0ebf1cc8
      Neil Conway authored
      var_samp(), stddev_pop(), and stddev_samp(). var_samp() and stddev_samp()
      are just renamings of the historical Postgres aggregates variance() and
      stddev() -- the latter names have been kept for backward compatibility.
      This patch includes updates for the documentation and regression tests.
      The catversion has been bumped.
      
      NB: SQL2003 requires that DISTINCT not be specified for any of these
      aggregates. Per discussion on -patches, I have NOT implemented this
      restriction: if the user asks for stddev(DISTINCT x), presumably they
      know what they are doing.
      0ebf1cc8
Loading