Japin Li <japi...@hotmail.com> writes:
> On Thu, 17 Nov 2022 at 23:06, Japin Li <japi...@hotmail.com> wrote:
>> I think we cannot remove the check, for example, if objtype is 
>> OBJECT_OPFAMILY,
>> and schema_does_not_exist_skipping() returns true, the so the msg keeps NULL,
>> if we remove this check, a sigfault might be occurd in ereport().

> Sorry, I didn't look into schema_does_not_exist_skipping(), and after look
> into schema_does_not_exist_skipping function and others, all paths that go
> out switch branch has non-NULL for msg, so we can remove this check safely.

This is a completely bad idea.  If it takes that level of analysis
to see that msg can't be null, we should leave the test in place.
Any future modification of either this code or what it calls could
break the conclusion.

                        regards, tom lane


Reply via email to