Re: Inconsistent behavior on Array & Is Null?

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Inconsistent behavior on Array & Is Null?
Date: 2004-04-03 21:35:26
Message-ID: 87wu4wiw2p.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Joe Conway <mail(at)joeconway(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message wespvp 2004-04-03 21:40:01 thread_test.c problems
Previous Message Joe Conway 2004-04-03 20:03:14 Re: Inconsistent behavior on Array & Is Null?