On Tue, Jan 11, 2022 at 10:19:33AM -0500, Melanie Plageman wrote:
> > If the expectedDesc NULL check were an 0001 patch, then 0002 (the main 
> > patch)
> > would be even easier to review.  Only foreign.c is different.
> 
> I'll wait to do that if preferred by committer.
> Are you imagining that patch 0001 would only add the check for
> expectedDesc that is missing from pg_config() and text_to_table()?

Yes, that's what I meant, but I haven't been able to determine if a NULL check
should be added at all.

I found this commit message, which indicates that it shouldn't be used in every
case.  I'm not clear when it should/not be used, though.

commit 60651e4cddbb77e8f1a0c7fc0be6a7e7bf626fe0
Author: Tom Lane <t...@sss.pgh.pa.us>
Date:   Sat Oct 28 14:02:21 2017 -0400

    Support domains over composite types in PL/Perl.
    
    In passing, don't insist on rsi->expectedDesc being set unless we
    actually need it; this allows succeeding in a couple of cases where
    PL/Perl functions returning setof composite would have failed before,
    and makes the error message more apropos in other cases.


Reply via email to