• Tom Lane's avatar
    Clean up handling of explicit NULL constants. Cases like · 350cb386
    Tom Lane authored
    	SELECT null::text;
    	SELECT int4fac(null);
    work as expected now.  In some cases a NULL must be surrounded by
    parentheses:
    	SELECT 2 + null;                 fails
    	SELECT 2 + (null);               OK
    This is a grammatical ambiguity that seems difficult to avoid.  Other
    than that, NULLs seem to behave about like you'd expect.  The internal
    implementation is that NULL constants are typed as UNKNOWN (like
    untyped string constants) until the parser can deduce the right type.
    350cb386
parse_node.c 11.7 KB