Re: Inconsistent behavior on Array & Is Null? - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Inconsistent behavior on Array & Is Null?
Date
Msg-id 87wu4wiw2p.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: Inconsistent behavior on Array & Is Null?  (Joe Conway <mail@joeconway.com>)
List 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 by date:

Previous
From: vinayj@ncst.ernet.in
Date:
Subject: Create Type Problem
Next
From: Bruce Momjian
Date:
Subject: Re: Function to kill backend