From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Joe Conway <mail(at)joeconway(dot)com> |
Cc: | "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Supporting NULL elements in arrays |
Date: | 2005-11-13 16:31:38 |
Message-ID: | 4592.1131899498@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Joe Conway <mail(at)joeconway(dot)com> writes:
> Jim C. Nasby wrote:
>> Instead of bending over backwards to try and support older cases, would
>> a compatability mode be possible? Seems that would solve a lot of
>> problems.
> Last time I thought about this problem, that's what I concluded. I don't
> think there is a reasonable and backward compatible solution.
> I also think the best non-compatible solution is to require non-numeric
> elements to be delimited (double quotes, configurable?), and use NULL
> unadorned to represent NULL.
After further thought I'm starting to agree with this point of view as
well. I propose the following details:
1. A null element is represented as the unquoted string NULL
(case-insensitive on input). Any use of quotes or backslashes
turns it into a simple string value "NULL" instead. array_out
will need to be careful to quote any string that matches NULL.
2. For backwards compatibility, we'll invent a GUC parameter
enable_array_nulls that defeats recognition of NULL in array_in.
(Any better ideas about the name of the parameter?)
This isn't ideal because of the compatibility risk, but once we get past
the transition period it's a reasonable definition.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Jaime Casanova | 2005-11-13 16:58:47 | REPLACE implementation (was: Re: MERGE vs REPLACE) |
Previous Message | Andrew Dunstan | 2005-11-13 16:12:19 | Re: Multi-table-unique-constraint |