Re: [PATCHES] Small fix for _equalValue() - Mailing list pgsql-hackers

From Thomas Lockhart
Subject Re: [PATCHES] Small fix for _equalValue()
Date
Msg-id 3C8A4AA7.64CA36C4@fourpalms.org
Whole thread Raw
Responses Re: [PATCHES] Small fix for _equalValue()
List pgsql-hackers
> > 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.  Do you know where this
> > construct is coming from?  I'd be inclined to consider the source at
> > fault, not equalValue.
> Someone is using NULL strings in gram.y, like in:
...
> there are several instances of it, all related to variable set.
> Well, NULL is a valid value for a (char *) so this seems legal
> enough to me.

OK, I've committed a patch to the stable and development trees which
adds a guard check in three places in gram.y, matching the guards
already in place for other cass in the same area.

Fernando, can you please check this (preferably without your patches to
guard the output functions, since those mask the upstream problem)?

Or, can you give me the complete test case you are using to demonstrate
the problem to make sure I'm testing the thing you are seeing?

While I'm looking at it, the "SET key=val" area is somewhat "kludge on
kludge" to enable lists of values, at least partly because it was at the
end of the development cycle and I didn't want to ripple breakage into
parts of the code I wasn't trying to touch. I'll go through and try to
rationalize it sometime soon (actually, I've already started but haven't
finished).

                      - Thomas

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: TODO question
Next
From: Olivier PRENANT
Date:
Subject: need help