Re: Small fix for _equalValue() - Mailing list pgsql-patches

From Tom Lane
Subject Re: Small fix for _equalValue()
Date
Msg-id 10262.1015516822@sss.pgh.pa.us
Whole thread Raw
In response to Re: Small fix for _equalValue()  (Fernando Nasser <fnasser@redhat.com>)
List pgsql-patches
Fernando Nasser <fnasser@redhat.com> writes:
> Tom Lane wrote:
>> Possibly a more interesting question, though, is *why* equalValue is
>> seeing Values with null pointer parts.  I cannot think of any good
>> reason to consider that a legal data structure.

> Someone is using NULL strings in gram.y, like in:

Ah, and the DEFAULT case returns a NULL.

IMHO this gram.y code is the broken part, not copyfuncs/equalfuncs.
There isn't any reason to build a Value with a null pointer --- and
there are probably a lot more places that will crash on one than just
copyfuncs/equalfuncs.

I note that SET DEFAULT was not done that way in 7.1, which IIRC was
the last time we had COPY_PARSE_PLAN_TREES on by default during a
development cycle.  Might be time to turn it on again for awhile ;-).
(The reason we don't keep it on always is that that case can mask
bugs too.  I like to flip the default setting every few months, but
I think I forgot to do it anytime during the 7.2 cycle.)

            regards, tom lane

pgsql-patches by date:

Previous
From: Fernando Nasser
Date:
Subject: Re: Small fix for _equalValue()
Next
From: Tom Lane
Date:
Subject: Re: Small fix for _equalValue()