Re: Supporting NULL elements in arrays - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Supporting NULL elements in arrays
Date
Msg-id 16247.1131553357@sss.pgh.pa.us
Whole thread Raw
In response to Re: Supporting NULL elements in arrays  (Marc Munro <marc@bloodnok.com>)
Responses Re: Supporting NULL elements in arrays  (mark@mark.mielke.cc)
List pgsql-hackers
Marc Munro <marc@bloodnok.com> writes:
> How about representing null array elements with a special-case cast-like
> null?  Something like {::null}

The problem with *any* proposal for let's-spell-NULL-like-this
is that "this" is inevitably a string that is valid as a text
data value.  Making the string weirder may reduce the odds of
a failure but the risk is still there, and meanwhile you're making
the null marker less readable.  (The above has the additional problem
of being indistinguishable from a sub-array.)

I think we really need something that is rejected as syntactically
invalid by the existing array input parser.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: SIGSEGV taken on 8.1 during dump/reload
Next
From: mark@mark.mielke.cc
Date:
Subject: Re: Supporting NULL elements in arrays