Hi, Joao Rito <[email protected]> 于2026年11月19日周四 07:58写道: > > Hi Tender, > > Thank you for the patch and for the clear report. I may be wrong on some > points, so please correct me. > > I tested this on current master (commit 8303f2e, cassert and debug enabled, > in a container). The patch applied cleanly. > > Without the patch, `SELECT expanded_record_info(2);` terminated the backend > ("server closed the connection unexpectedly"). With the patch, the same > statement returns: > > ERROR: argument must be of a composite type > > and the session stays alive. `make check` passes with the patch (243 tests). > > I also tried a few other calls with the patch. `expanded_record_identity(2)`, > `expanded_record_field_text(2,1)`, a text argument, and an integer array > return the same error. A table row type and a domain over a composite type > give the same output with and without the patch. `ROW(1,'a')` also works with > the patch (I did not run it without the patch). NULL input of a non-composite > type returns NULL, because the function is STRICT in my setup. > > One small question. The error message could mention the function name, or use > ereport with ERRCODE_DATATYPE_MISMATCH. This is only a test helper, so elog > may be fine. I do not have a strong opinion. >
Thanks for the review. I suspect this case is rare enough in practice that it may not be worth spending more time on the patch. -- Tender Wang
