Re: missing assert in makeString - Mailing list pgsql-hackers

From Tom Lane
Subject Re: missing assert in makeString
Date
Msg-id 1952567.1739947733@sss.pgh.pa.us
Whole thread Raw
Responses Re: missing assert in makeString
Re: missing assert in makeString
List pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> I investigated the crashes in "xmlnamespaces to xmlelement" patch and it
> looks like there was a badly used makeString function. The argument should
> not be null, elsewhere serialization to string fails - and deserialization
> doesn't support this case.
> I propose to add an assert there like (make check-world passed)

Hmmm ... while I don't necessarily object to this patch, we have a lot
of makeFoo() functions that build nodes, and hardly any of them have
asserts like this one.  Why makeString() in particular?  Is the fault
on the serialization side, instead?  If there's a general expectation
that a String node's value isn't null, how come the original patch
worked at all?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Daniil Davydov
Date:
Subject: Re: Forbid to DROP temp tables of other sessions
Next
From: Sergey Belyashov
Date:
Subject: Re: BUG #18815: Logical replication worker Segmentation fault