Joe Conway <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to