> On 13 Jul 2026, at 22:38, Tristan Partin <[email protected]> wrote:

> The patches look good.

Thanks for reviewing!

> I did have one comment in patch 0001. For the 
> hasWarned argument to init_host_context, do we you think we should add 
> an Assert(hasWarned) or add a pg_attribute_nonnull(3)? I see we 
> dereference the pointer without first checking for its validity. I know 
> it isn't common in Postgres source code to add such protections, but 
> I figured I would point it out anyway.

Given that this is a very niche static function with very few callsites, I'm
not too worried about it being called with NULL.  That being said, defensive
programming isn't just to defend against what we know but also what we don't
know about so I'm not against adding such protections.  There are likely many
other functions in this file which could benefit more from pg_attribute_nonnull
but we also need to start somewhere.

--
Daniel Gustafsson



Reply via email to