1. 28 Apr, 2008 1 commit
  2. 20 Mar, 2008 1 commit
    • Tom Lane's avatar
      Arrange for an explicit cast applied to an ARRAY[] constructor to be applied · 6b0706ac
      Tom Lane authored
      directly to all the member expressions, instead of the previous implementation
      where the ARRAY[] constructor would infer a common element type and then we'd
      coerce the finished array after the fact.  This has a number of benefits,
      one being that we can allow an empty ARRAY[] construct so long as its
      element type is specified by such a cast.
      
      Brendan Jurd, minor fixes by me.
      6b0706ac
  3. 03 Jun, 2007 1 commit
  4. 12 May, 2007 1 commit
    • Tom Lane's avatar
      Fix the problem that creating a user-defined type named _foo, followed by one · 9aa3c782
      Tom Lane authored
      named foo, would work but the other ordering would not.  If a user-specified
      type or table name collides with an existing auto-generated array name, just
      rename the array type out of the way by prepending more underscores.  This
      should not create any backward-compatibility issues, since the cases in which
      this will happen would have failed outright in prior releases.
      
      Also fix an oversight in the arrays-of-composites patch: ALTER TABLE RENAME
      renamed the table's rowtype but not its array type.
      9aa3c782
  5. 29 Sep, 2006 1 commit
    • 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
  6. 10 Sep, 2006 1 commit
    • Tom Lane's avatar
      Rename contains/contained-by operators to @> and <@, per discussion that · ba920e1c
      Tom Lane authored
      agreed these symbols are less easily confused.  I made new pg_operator
      entries (with new OIDs) for the old names, so as to provide backward
      compatibility while making it pretty easy to remove the old names in
      some future release cycle.  This commit only touches the core datatypes,
      contrib will be fixed separately.
      ba920e1c
  7. 02 May, 2006 1 commit
  8. 14 Mar, 2006 1 commit
    • Tom Lane's avatar
      Improve parser so that we can show an error cursor position for errors · 20ab467d
      Tom Lane authored
      during parse analysis, not only errors detected in the flex/bison stages.
      This is per my earlier proposal.  This commit includes all the basic
      infrastructure, but locations are only tracked and reported for errors
      involving column references, function calls, and operators.  More could
      be done later but this seems like a good set to start with.  I've also
      moved the ReportSyntaxErrorPosition logic out of psql and into libpq,
      which should make it available to more people --- even within psql this
      is an improvement because warnings weren't handled by ReportSyntaxErrorPosition.
      20ab467d
  9. 19 Nov, 2005 1 commit
    • Tom Lane's avatar
      Change array_push and array_cat so that they retain the lower bound of · 1e9a1a70
      Tom Lane authored
      the array (for array_push) or higher-dimensional array (for array_cat)
      rather than decrementing it as before.  This avoids generating lower
      bounds other than one for any array operation within the SQL spec.  Per
      recent discussion.
      Interestingly, this seems to have been the original behavior, because
      while updating the docs I noticed that a large fraction of relevant
      examples were *wrong* for the old behavior and are now right.  Is it
      worth correcting this in the back-branch docs?
      1e9a1a70
  10. 17 Nov, 2005 1 commit
    • 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
  11. 26 Jun, 2005 1 commit
  12. 22 Apr, 2005 1 commit
    • Tom Lane's avatar
      First cut at planner support for bitmap index scans. Lots to do yet, · bc843d39
      Tom Lane authored
      but the code is basically working.  Along the way, rewrite the entire
      approach to processing OR index conditions, and make it work in join
      cases for the first time ever.  orindxpath.c is now basically obsolete,
      but I left it in for the time being to allow easy comparison testing
      against the old implementation.
      bc843d39
  13. 28 Feb, 2005 1 commit
  14. 28 Aug, 2004 1 commit
  15. 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
  16. 09 Jun, 2004 1 commit
    • Tom Lane's avatar
      Support assignment to subfields of composite columns in UPDATE and INSERT. · 7e64dbc6
      Tom Lane authored
      As a side effect, cause subscripts in INSERT targetlists to do something
      more or less sensible; previously we evaluated such subscripts and then
      effectively ignored them.  Another side effect is that UPDATE-ing an
      element or slice of an array value that is NULL now produces a non-null
      result, namely an array containing just the assigned-to positions.
      7e64dbc6
  17. 05 Apr, 2004 1 commit
  18. 25 Sep, 2003 1 commit
  19. 17 Aug, 2003 1 commit
  20. 21 Jul, 2003 1 commit
  21. 19 Jul, 2003 1 commit
  22. 29 Jun, 2003 1 commit
    • Tom Lane's avatar
      Support expressions of the form 'scalar op ANY (array)' and · bee21792
      Tom Lane authored
      'scalar op ALL (array)', where the operator is applied between the
      lefthand scalar and each element of the array.  The operator must
      yield boolean; the result of the construct is the OR or AND of the
      per-element results, respectively.
      
      Original coding by Joe Conway, after an idea of Peter's.  Rewritten
      by Tom to keep the implementation strictly separate from subqueries.
      bee21792
  23. 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
  24. 25 Jun, 2003 1 commit
  25. 24 Jun, 2003 1 commit
  26. 08 Apr, 2003 1 commit
  27. 27 Aug, 2002 1 commit
  28. 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
  29. 21 May, 2001 1 commit
  30. 23 Jul, 2000 1 commit
    • Tom Lane's avatar
      Further cleanup of array behavior. Slice assignments to arrays with · e4e6459c
      Tom Lane authored
      varlena elements work now.  Allow assignment to previously-nonexistent
      subscript position to extend array, but only for 1-D arrays and only
      if adjacent to existing positions (could do more if we had a way to
      represent nulls in arrays, but I don't want to tackle that now).
      Arrange for assignment of NULL to an array element in UPDATE to be a
      no-op, rather than setting the entire array to NULL as it used to.
      (Throwing an error would be a reasonable alternative, but it's never
      done that...)  Update regress test accordingly.
      e4e6459c
  31. 15 Jan, 2000 1 commit
  32. 05 May, 1999 1 commit
    • Bruce Momjian's avatar
      I have two patches for 6.5.0: · 5d5cf912
      Bruce Momjian authored
      arrayfuncs.patch        fixes a small bug in my previous patches for
      arrays
      
      array-regress.patch     adds _bpchar and _varchar to regression tests
      
      --
      Massimo Dal Zotto
      5d5cf912
  33. 26 Apr, 1998 1 commit
  34. 07 Apr, 1998 1 commit
  35. 30 Mar, 1998 1 commit
    • Bruce Momjian's avatar
      The following uuencoded, gzip'd file will ... · 57b59664
      Bruce Momjian authored
      1. Remove the char2, char4, char8 and char16 types from postgresql
      2. Change references of char16 to name in the regression tests.
      3. Rename the char16.sql regression test to name.sql.  4. Modify
      the regression test scripts and outputs to match up.
      
      Might require new regression.{SYSTEM} files...
      
      Darren King
      57b59664
  36. 29 Apr, 1997 1 commit