Re: preptlist.c can insert unprocessed expression trees

2025-01-29 Thread Sami Imseih
> to a varchar length-checking function and then to CoerceToDomain. > Of course they really ought to look the same. +1. I confirmed this as well with the supplied test case. > In the attached 0001 patch I called it > coerce_null_to_domain and put it in parse_coerce.c. I do think the name of the

preptlist.c can insert unprocessed expression trees

2025-01-28 Thread Tom Lane
I happened across a not-great behavior in expand_insert_targetlist. If a column is omitted in an INSERT, and there's no column default, the code generates a NULL Const to be inserted. Furthermore, if the column is of a domain type, we wrap the Const in CoerceToDomain, so as to throw a run-time erro