"Kevin Grittner" <kevin.gritt...@wicourts.gov> writes: > Sam Mason <s...@samason.me.uk> wrote: >> If we did follow Kevin's request directly, should we also be >> specifying the type of NULL? > I don't *think* the SQL standard requires that, and barring that I > don't see any compelling reason to type NULL.
Actually, AFAICS the SQL spec *does* require you to cast NULL literals explicitly in nearly all contexts. There are exceptions for assigning NULL directly to a field (in INSERT or UPDATE), and maybe some other places, but not many. The PG type system treats a bare NULL literal as "unknown", so most of the same issues come up for either NULL or literal constants. If you were to try to get rid of the "unknown" concept, I think the only place you'd find yourself violating the standard is the aforesaid narrow exceptions. Usability is a different question though ... regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs