Re: Supporting NULL elements in arrays

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marc Munro <marc(at)bloodnok(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Supporting NULL elements in arrays
Date: 2005-11-09 16:22:37
Message-ID: 16247.1131553357@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Marc Munro <marc(at)bloodnok(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message mark 2005-11-09 16:25:05 Re: Supporting NULL elements in arrays
Previous Message Martijn van Oosterhout 2005-11-09 16:19:28 Re: SIGSEGV taken on 8.1 during dump/reload