1. 28 Aug, 2004 1 commit
  2. 08 Aug, 2004 1 commit
    • 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
  3. 05 Aug, 2004 1 commit
    • 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
  4. 16 Jun, 2004 1 commit
    • 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
  5. 08 Jun, 2004 1 commit
  6. 06 Jun, 2004 1 commit
    • 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
  7. 07 Jan, 2004 1 commit
  8. 29 Nov, 2003 1 commit
    • PostgreSQL Daemon's avatar
      · 969685ad
      PostgreSQL Daemon authored
      $Header: -> $PostgreSQL Changes ...
      969685ad
  9. 25 Sep, 2003 1 commit
  10. 17 Aug, 2003 1 commit
    • 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
  11. 15 Aug, 2003 1 commit
  12. 08 Aug, 2003 1 commit
  13. 04 Aug, 2003 2 commits
  14. 27 Jul, 2003 1 commit
  15. 01 Jul, 2003 1 commit
  16. 27 Jun, 2003 1 commit
    • 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
  17. 25 Jun, 2003 1 commit
  18. 24 Jun, 2003 1 commit
  19. 09 May, 2003 1 commit
  20. 08 May, 2003 1 commit
  21. 08 Apr, 2003 1 commit
  22. 29 Jan, 2003 1 commit
  23. 13 Nov, 2002 1 commit
  24. 11 Nov, 2002 1 commit
  25. 10 Nov, 2002 1 commit
  26. 08 Nov, 2002 1 commit
    • 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
  27. 18 Sep, 2002 1 commit
    • 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
  28. 04 Sep, 2002 1 commit
  29. 26 Aug, 2002 1 commit
    • 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
  30. 20 Jun, 2002 1 commit
  31. 20 Mar, 2002 1 commit
  32. 16 Mar, 2002 1 commit
    • 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
  33. 02 Mar, 2002 1 commit
  34. 01 Mar, 2002 1 commit
  35. 18 Feb, 2002 1 commit
  36. 29 Nov, 2001 1 commit
    • Tom Lane's avatar
      Fix array_out's failure to backslash backslashes, per bug# 524. Also, · 636a939f
      Tom Lane authored
      remove brain-dead rule that double quotes are needed if and only if the
      datatype is pass-by-reference; neither direction of the implication holds
      water.  Instead, examine the actual data string to see if it contains
      any characters that force us to quote it.
      Add some documentation about quoting of array values, which was previously
      explained nowhere AFAICT.
      636a939f
  37. 25 Oct, 2001 1 commit
  38. 22 Mar, 2001 1 commit
  39. 24 Jan, 2001 1 commit