Re: Inconsistent behavior on Array & Is Null?

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Inconsistent behavior on Array & Is Null?
Дата
Msg-id 87wu4wiw2p.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: Inconsistent behavior on Array & Is Null?  (Joe Conway <mail@joeconway.com>)
Список pgsql-hackers
Joe Conway <mail@joeconway.com> writes:

> I'd think given the preceding, it would make more sense to throw an error
> whenever trying to access an element greater than the length.

For an analogous situation in SQL I would propose

select (select foo from bar where xyz);

if there are no records in bar it returns NULL. Only if there are multiple
records in bar or some sort of error in the subquery does it produce an error.

Does SQL-99 not say anything about this case? It seems like the kind of thing
a standard should specify.

-- 
greg



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

Предыдущее
От: vinayj@ncst.ernet.in
Дата:
Сообщение: Create Type Problem
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Function to kill backend