Re: When is a record NULL?
От
Merlin Moncure
Тема
Re: When is a record NULL?
Дата
Msg-id
b42b73150907241035ja15c1c7v9ad90c29626ce352@mail.gmail.com
Ответ на
Re: When is a record NULL? (David E. Wheeler)
Список
Дерево обсуждения
When is a record NULL? "David E. Wheeler" <david@kineticode.com>
Re: When is a record NULL? Jeff Davis <pgsql@j-davis.com>
Re: When is a record NULL? "David E. Wheeler" <david@kineticode.com>
Re: When is a record NULL? Tom Lane <tgl@sss.pgh.pa.us>
Re: When is a record NULL? "David E. Wheeler" <david@kineticode.com>
Re: When is a record NULL? Tom Lane <tgl@sss.pgh.pa.us>
Re: When is a record NULL? "David E. Wheeler" <david@kineticode.com>
Re: When is a record NULL? Jeff Davis <pgsql@j-davis.com>
Re: When is a record NULL? "David E. Wheeler" <david@kineticode.com>
Re: When is a record NULL? "David E. Wheeler" <david@kineticode.com>
Re: When is a record NULL? Brendan Jurd <direvus@gmail.com>
Re: When is a record NULL? "David E. Wheeler" <david@kineticode.com>
Re: When is a record NULL? Brendan Jurd <direvus@gmail.com>
Re: When is a record NULL? Tom Lane <tgl@sss.pgh.pa.us>
Re: When is a record NULL? Jeff Davis <pgsql@j-davis.com>
Re: When is a record NULL? Tom Lane <tgl@sss.pgh.pa.us>
Re: When is a record NULL? "David E. Wheeler" <david@kineticode.com>
Re: When is a record NULL? Jeff Davis <pgsql@j-davis.com>
Re: When is a record NULL? David E. Wheeler <david@kineticode.com>
Re: When is a record NULL? "David E. Wheeler" <david@kineticode.com>
Re: When is a record NULL? "David E. Wheeler" <david@kineticode.com>
Re: When is a record NULL? Jeff Davis <pgsql@j-davis.com>
Re: When is a record NULL? "David E. Wheeler" <david@kineticode.com>
Re: When is a record NULL? "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: When is a record NULL? Sam Mason <sam@samason.me.uk>
Re: When is a record NULL? "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: When is a record NULL? Sam Mason <sam@samason.me.uk>
Re: When is a record NULL? "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: When is a record NULL? Sam Mason <sam@samason.me.uk>
Re: When is a record NULL? "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: When is a record NULL? Sam Mason <sam@samason.me.uk>
Re: When is a record NULL? "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: When is a record NULL? Greg Stark <gsstark@mit.edu>
Re: When is a record NULL? "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: When is a record NULL? Robert Haas <robertmhaas@gmail.com>
Re: When is a record NULL? "David E. Wheeler" <david@kineticode.com>
Re: When is a record NULL? "David E. Wheeler" <david@kineticode.com>
Re: When is a record NULL? "Eric B. Ridge" <ebr@tcdi.com>
Re: When is a record NULL? "David E. Wheeler" <david@kineticode.com>
Re: When is a record NULL? David E. Wheeler <david@kineticode.com>
Re: When is a record NULL? Sam Mason <sam@samason.me.uk>
Re: When is a record NULL? "David E. Wheeler" <david@kineticode.com>
Re: When is a record NULL? Richard Huxton <dev@archonet.com>
Re: When is a record NULL? Michael Gould <mgould@intermodalsoftwaresolutions.net>
Re: When is a record NULL? Merlin Moncure <mmoncure@gmail.com>
Re: When is a record NULL? Jeff Davis <pgsql@j-davis.com>
Re: When is a record NULL? Tom Lane <tgl@sss.pgh.pa.us>
Re: When is a record NULL? Merlin Moncure <mmoncure@gmail.com>
Re: When is a record NULL? Greg Stark <gsstark@mit.edu>
Re: When is a record NULL? Merlin Moncure <mmoncure@gmail.com>
Re: When is a record NULL? Merlin Moncure <mmoncure@gmail.com>
Re: When is a record NULL? Greg Stark <gsstark@mit.edu>
Re: When is a record NULL? "David E. Wheeler" <david@kineticode.com>
Re: When is a record NULL? Joshua Tolley <eggyknap@gmail.com>
Re: When is a record NULL? Tom Lane <tgl@sss.pgh.pa.us>
Re: When is a record NULL? "David E. Wheeler" <david@kineticode.com>
On Fri, Jul 24, 2009 at 5:15 AM, David E. Wheeler wrote: > On Jul 23, 2009, at 9:34 PM, Brendan Jurd wrote: > >> Well, a ROW is an ordered set of values, each one of which may be >> either NULL or NOT NULL. > > Right. > >> It doesn't really make sense to talk about the ROW itself being NULL >> or NOT NULL, only its member values (but for extra confusion, contrast >> with the treatment of arrays, which can themselves be NULL). > > Well then maybe a record (row) should *never* be null. I disagree, and I think our current way of treating things is incorrect (although harmless). I rowtype can be null: select null::somerowtype; I think the following should _not_ return true: select (null, null)::somerowtype is null; The reasoning being that while the rowtype members are null, the record variable itself is not; these are two distinct cases and should be checked for and treated differently. Another line of reasoning for this is that if something gives 'true' for the is null operator, it should behave as null does, giving null for any operations on it and giving null for STRICT functions, to give a couple of examples. create table foo (a int, b int); select (null, null)::foo is null;?column? ----------t create or replace function doit(foo) returns void as $$ begin raise notice '!'; end; $$ language plpgsql strict; select doit(row(null, null)::foo); NOTICE: ! <-- what???!? I think this is wrong, and if the sql standard sez it is so, then the standard is wrong :-). merlin
В списке pgsql-hackers по дате отправления