Re: BUG #4921: ltree @> ltree[] operator shouldn't fail if ltree[] is empty
В списке pgsql-bugs по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #4921: ltree @> ltree[] operator shouldn't fail if ltree[] is empty |
| Дата | |
| Msg-id | 19927.1267033313@sss.pgh.pa.us обсуждение |
| Ответ на | Re: BUG #4921: ltree @> ltree[] operator shouldn't fail if ltree[] is empty (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-bugs |
I wrote:
>>> 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
>>> array.
>>>
>>> I'm leaning to #2 myself. However, there are probably other places with
>>> the same kind of issue, and in some of them it might make more sense to
>>> reject multidimensional arrays.
After looking closer, I see that there are seven different occurrences
of this coding pattern in contrib/ltree. They all look to be sane for
zero-element arrays but I'm hesitant to decide that they should all
allow multidimensionals. So I'll go with fix #1 instead.
I don't see any other trouble spots elsewhere. There are other tests
that require ARR_NDIM() == 1, but they are in contexts that will reject
empty arrays anyway, so I don't feel a need to change them.
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера