Re: SEGV in contrib/array/array_iterator.c

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: SEGV in contrib/array/array_iterator.c
Дата
Msg-id 20020402122436.V79913-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Re: SEGV in contrib/array/array_iterator.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: SEGV in contrib/array/array_iterator.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Tue, 2 Apr 2002, Tom Lane wrote:

> Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> > Are the array iterator functions supposed to act sort of like
> > =ANY/=ALL except across an array instead of a subselect?
>
> Seems like a reasonable definition.
>
> > If so,
> > isStrict probably isn't right, since for an empty subselect the return
> > value does not depend on the element being searched for.
>
> Hm ... isn't it NULL anyway, if the left side is NULL?
>
> But if you're right, then the correct fix involves updating the
> functions to V1 calling conventions, so that they can make a correct
> test for NULL inputs (rather than bogusly checking for zero value).

I think the empty case is special, due to the rules on <quantified
comparison predicate>s.  It looks like no comparison predicates
need to be run.

I think the applicable parts of 8.7 are
General Rule 2a
 If T is empty or if the implied <comparison predicate> is true
 for every row RT in T, then "R <comp op> <all> T" is true.
General Rule 2d
 If T is empty or if the implied <comparison predicate> is false
 for every row RT in T, then "R <comp op> <some> T" is false.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: SEGV in contrib/array/array_iterator.c
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Solaris 8 install of postgres 7.2