st 11. 2. 2026 v 22:10 odesÃlatel Tom Lane <[email protected]> napsal:
> Pavel Stehule <[email protected]> writes: > > I got a bug report for plpgsql_check related to domains of composite > types. > > While I played with code, maybe I found a bug: > > Indeed. Looks like exec_stmt_return's special case for a simple > variable reference forgets to fill estate->rettype when the variable > is a null record. This is an old bug, but I think we'd managed not > to notice because that value isn't consulted unless we have to cast > to a domain. > > The behavior we want is what exec_eval_datum does, and after looking > at it for a minute I wondered why we don't just use exec_eval_datum > instead of duplicating logic. The ROW case already does that, so > we can fix the bug with strictly less code. > > regards, tom lane > Nice, Thank you Pavel
