> Hmm. ltree has always had that ARR_NDIM == 1 check. I think the
> the behavior changed is that ARRAY(SELECT ...) used to return a NULL
> zero rows, and now it returns an empty (zero-dimensional) array.
Ah OK that makes sense, especially given the "hack" I used as a
workaround, which effectively emulates the old behavior.
> I can see two reasonable ways to address this:
> * Change the ltree test to reject only ARR_NDIM > 1.
> * Drop the ARR_NDIM check altogether, and let it search any sort of
> I'm leaning to #2 myself. However, there are probably other places
> the same kind of issue, and in some of them it might make more sense
> reject multidimensional arrays.
There may be a third option; it seems to me that the assert is there
more to stop unexpected behavior with arrays of dims of 2 or more.
The real solution might be to just convert a 0-dim array into "null"
or equivalent and still assert error if dims >= 2?
In response to
pgsql-bugs by date
|Next:||From: Tom Lane||Date: 2009-07-15 15:30:26|
|Subject: Re: [PERFORM] BUG #4919: CREATE USER command slows down system performance |
|Previous:||From: Tom Lane||Date: 2009-07-15 15:21:42|
|Subject: Re: BUG #4921: ltree @> ltree operator shouldn't fail if ltree is empty |