Re: preptlist.c can insert unprocessed expression trees
От | Sami Imseih |
---|---|
Тема | Re: preptlist.c can insert unprocessed expression trees |
Дата | |
Msg-id | CAA5RZ0tb8+4ryMV_0453o+4BVptLTaKBrWR2aJ8+sYjEnOxJNw@mail.gmail.com обсуждение исходный текст |
Ответ на | preptlist.c can insert unprocessed expression trees (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
> 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 function is a bit misleading. coerce_null_to_domain could optionally coerce to a domain if typid != baseTypeId, but not necessarily. From what I can tell, the coerce_null_to_domain function will be called anytime an implicit NULL is supplied to an INSERT or UPDATE and the target column does not have a default; so maybe it should be called coerce_implicit_null ? > (The caller has > to produce an input that's of the base type, after all.) So it seems > like that's not a convenience so much as an encouragement to incorrect > coding. I propose, for HEAD only, 0002 which removes that misfeature > and requires callers to supply the info. This makes sense. check-world passed with both patches applied. Regards, Sami
В списке pgsql-hackers по дате отправления: