Re: inconsistent composite type null handling in plpgsql out variable
От | Pavel Stehule |
---|---|
Тема | Re: inconsistent composite type null handling in plpgsql out variable |
Дата | |
Msg-id | 162867790909010435x42c58cb6i6ac9fe25e354563a@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: inconsistent composite type null handling in plpgsql out variable (Sam Mason <sam@samason.me.uk>) |
Список | pgsql-bugs |
2009/9/1 Sam Mason <sam@samason.me.uk>: > On Mon, Aug 31, 2009 at 07:26:59PM +0200, Pavel Stehule wrote: >> 2009/8/31 Sam Mason <sam@samason.me.uk>: >> > The more awkward case (to me anyway) is that the standard says (1,NULL) >> > IS NULL should evaluate to TRUE. >> >> what? >> >> only (NULL, NULL) IS NULL is true > > Bah, sorry you're right! =C2=A0I was rattling my favorite tin and getting > mixed up with the behavior with IS NOT NULL, the negation of which > would say this row is null. =C2=A0I.e: > > =C2=A0SELECT NOT (1,NULL) IS NOT NULL; > > evaluates to TRUE. =C2=A0I think the consensus is that we should continue= to > follow the spec on this, but I was getting confused as to which operator > contains the EXISTS and FORALL operator. =C2=A0I.e. a value "v" IS NULL i= ff > all elements of "v" are not 'the null value', whereas "v" IS NOT NULL > iff an element of "v" is 'the null value'. > >> p.s. what isn't consistent (maybe - there are more possible >> interpretations) is >> >> (NULL, NULL) IS DISTINCT FROM NULL is true > > Yup, I'd agree with Merlin that a ROW consisting entirely of 'null > values' should itself be 'the null value' (to use the terminology from > the copy of the SQL spec I'm reading). =C2=A0I think this should also work > recursively: > > =C2=A0SELECT ROW(ROW(NULL)) IS DISTINCT FROM NULL; > > should return FALSE, in my understanding. it's question. You ask, is it (NULL, NULL) same as NULL. Without some reduction - ROW(NULL, NULL) is really different than NULL. Pavel > > -- > =C2=A0Sam =C2=A0http://samason.me.uk/ > > -- > Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-bugs >
В списке pgsql-bugs по дате отправления: