Skip to content
Snippets Groups Projects
  1. Sep 27, 2004
    • Tom Lane's avatar
      Rewrite ReadArrayStr() to avoid O(N^2) behavior on large strings, · ae8f7313
      Tom Lane authored
      and hopefully improve code clarity while at it.  One intentional
      semantics change: a backslashed space will not be treated as removable
      trailing whitespace, as the prior coding would do.  ISTM that if it
      wouldn't be considered removable leading whitespace, it shouldn't be
      stripped at the end either.
      ae8f7313
  2. Sep 16, 2004
  3. Sep 02, 2004
  4. Aug 29, 2004
  5. Aug 28, 2004
  6. Aug 08, 2004
    • Joe Conway's avatar
      Tighened up syntax checking of array input processing considerably. Junk that · cb50ee28
      Joe Conway authored
      was previously allowed in odd places with odd results now causes an ERROR.
      Also changed behavior with respect to whitespace -- trailing whitespace is
      now ignored as well as leading whitespace (which has always been ignored).
      
      Documentation updated to reflect change in whitespace handling. Also some
      refactoring to what I believe is a more sensible order of several paragraphs.
      cb50ee28
  7. Aug 05, 2004
    • Joe Conway's avatar
      Require that array literals produce "rectangular" arrays, i.e. all the · 0e13d627
      Joe Conway authored
      subarrays of a given dimension have the same number of elements/subarrays.
      
      Also repair a longstanding undocumented (as far as I can see) ability to
      explicitly set array bounds in the array literal syntax. It now can
      deal properly with negative array indicies. Modify array_out so that
      arrays with non-standard lower bounds (i.e. not 1) are output with
      the expicit dimension syntax. This fixes a longstanding issue whereby
      arrays with non-default lower bounds had them changed to default
      after a dump/reload cycle.
      
      Modify regression tests and docs to suit, and add some minimal
      documentation regarding the explicit dimension syntax.
      0e13d627
  8. Jun 16, 2004
    • Tom Lane's avatar
      Represent type-specific length coercion functions as pg_cast entries, · d70a42e6
      Tom Lane authored
      eliminating the former hard-wired convention about their names.  Allow
      pg_cast entries to represent both type coercion and length coercion in
      a single step --- this is represented by a function that takes an
      extra typmod argument, just like a length coercion function.  This
      nicely merges the type and length coercion mechanisms into something
      at least a little cleaner than we had before.  Make use of the single-
      coercion-step behavior to fix integer-to-bit coercion so that coercing
      to bit(n) yields the rightmost n bits of the integer instead of the
      leftmost n bits.  This should fix recurrent complaints about the odd
      behavior of this coercion.  Clean up the documentation of the bit string
      functions, and try to put it where people might actually find it.
      Also, get rid of the unreliable heuristics in ruleutils.c about whether
      to display nested coercion steps; instead require parse_coerce.c to
      label them properly in the first place.
      d70a42e6
  9. Jun 08, 2004
  10. Jun 06, 2004
    • Tom Lane's avatar
      Infrastructure for I/O of composite types: arrange for the I/O routines · c541bb86
      Tom Lane authored
      of a composite type to get that type's OID as their second parameter,
      in place of typelem which is useless.  The actual changes are mostly
      centralized in getTypeInputInfo and siblings, but I had to fix a few
      places that were fetching pg_type.typelem for themselves instead of
      using the lsyscache.c routines.  Also, I renamed all the related variables
      from 'typelem' to 'typioparam' to discourage people from assuming that
      they necessarily contain array element types.
      c541bb86
  11. Jan 07, 2004
  12. Nov 29, 2003
    • PostgreSQL Daemon's avatar
      · 969685ad
      PostgreSQL Daemon authored
      $Header: -> $PostgreSQL Changes ...
      969685ad
  13. Sep 25, 2003
  14. Aug 17, 2003
    • Tom Lane's avatar
      Create a 'type cache' that keeps track of the data needed for any particular · ec646dbc
      Tom Lane authored
      datatype by array_eq and array_cmp; use this to solve problems with memory
      leaks in array indexing support.  The parser's equality_oper and ordering_oper
      routines also use the cache.  Change the operator search algorithms to look
      for appropriate btree or hash index opclasses, instead of assuming operators
      named '<' or '=' have the right semantics.  (ORDER BY ASC/DESC now also look
      at opclasses, instead of assuming '<' and '>' are the right things.)  Add
      several more index opclasses so that there is no regression in functionality
      for base datatypes.  initdb forced due to catalog additions.
      ec646dbc
  15. Aug 15, 2003
  16. Aug 08, 2003
  17. Aug 04, 2003
  18. Jul 27, 2003
  19. Jul 01, 2003
  20. Jun 27, 2003
    • Tom Lane's avatar
      Create real array comparison functions (that use the element datatype's · b3c0551e
      Tom Lane authored
      comparison functions), replacing the highly bogus bitwise array_eq.  Create
      a btree index opclass for ANYARRAY --- it is now possible to create indexes
      on array columns.
      Arrange to cache the results of catalog lookups across multiple array
      operations, instead of repeating the lookups on every call.
      Add string_to_array and array_to_string functions.
      Remove singleton_array, array_accum, array_assign, and array_subscript
      functions, since these were for proof-of-concept and not intended to become
      supported functions.
      Minor adjustments to behavior in some corner cases with empty or
      zero-dimensional arrays.
      
      Joe Conway (with some editorializing by Tom Lane).
      b3c0551e
  21. Jun 25, 2003
  22. May 10, 2003
  23. May 09, 2003
  24. Apr 09, 2003
  25. Jan 29, 2003
  26. Nov 13, 2002
  27. Nov 11, 2002
  28. Nov 10, 2002
  29. Nov 08, 2002
    • Bruce Momjian's avatar
      The "Allow easy display of usernames in a group (pg_hba.conf uses groups · fef731d1
      Bruce Momjian authored
      now)" item on the open items, and subsequent plpgsql function I sent in,
      made me realize it was too hard to get the upper and lower bound of an
      array. The attached creates two functions that I think will be very
      useful when combined with the ability of plpgsql to return sets.
      
      array_lower(array, dim_num)
      - and -
      array_upper(array, dim_num)
      
      They return the value (as an int) of the upper and lower bound of the
      requested dim in the provided array.
      
      Joe Conway
      fef731d1
  30. Sep 18, 2002
    • Tom Lane's avatar
      Extend pg_cast castimplicit column to a three-way value; this allows us · b26dfb95
      Tom Lane authored
      to be flexible about assignment casts without introducing ambiguity in
      operator/function resolution.  Introduce a well-defined promotion hierarchy
      for numeric datatypes (int2->int4->int8->numeric->float4->float8).
      Change make_const to initially label numeric literals as int4, int8, or
      numeric (never float8 anymore).
      Explicitly mark Func and RelabelType nodes to indicate whether they came
      from a function call, explicit cast, or implicit cast; use this to do
      reverse-listing more accurately and without so many heuristics.
      Explicit casts to char, varchar, bit, varbit will truncate or pad without
      raising an error (the pre-7.2 behavior), while assigning to a column without
      any explicit cast will still raise an error for wrong-length data like 7.3.
      This more nearly follows the SQL spec than 7.2 behavior (we should be
      reporting a 'completion condition' in the explicit-cast cases, but we have
      no mechanism for that, so just do silent truncation).
      Fix some problems with enforcement of typmod for array elements;
      it didn't work at all in 'UPDATE ... SET array[n] = foo', for example.
      Provide a generalized array_length_coerce() function to replace the
      specialized per-array-type functions that used to be needed (and were
      missing for NUMERIC as well as all the datetime types).
      Add missing conversions int8<->float4, text<->numeric, oid<->int8.
      initdb forced.
      b26dfb95
  31. Sep 04, 2002
  32. Aug 26, 2002
    • Tom Lane's avatar
      Modify array operations to include array's element type OID in the · 5cabcfcc
      Tom Lane authored
      array header, and to compute sizing and alignment of array elements
      the same way normal tuple access operations do --- viz, using the
      tupmacs.h macros att_addlength and att_align.  This makes the world
      safe for arrays of cstrings or intervals, and should make it much
      easier to write array-type-polymorphic functions; as examples see
      the cleanups of array_out and contrib/array_iterator.  By Joe Conway
      and Tom Lane.
      5cabcfcc
  33. Jun 20, 2002
  34. Mar 20, 2002
  35. Mar 16, 2002
    • Tom Lane's avatar
      Try to make array_in's behavior a tad less bizarre. Leading whitespace · 0f2fbbba
      Tom Lane authored
      before a data item is now always skipped, rather than only sometimes.
      Backslashes not within double-quoted text are treated reasonably, as
      are multiple sequences of quoted text in a single data item.  But it
      still seems rather prone to misbehavior if the input is not completely
      syntactically correct --- in particular, garbage following a right brace
      will be ignored.
      0f2fbbba
  36. Mar 02, 2002
  37. Mar 01, 2002
Loading