Require callers of coerce_to_domain() to supply base type/typmod. In view of the issue fixed in commit 0da39aa76, it no longer seems like a great idea for coerce_to_domain() to offer to perform a lookup that its caller probably should have done already. The caller should be providing a value of the domain's base type, so it's hard to envision a valid case where it hasn't looked up that type. After 0da39aa76 there is only one caller using the option for internal lookup, and that one can trivially be rearranged to not do that. So this seems more like a bug-encouraging misfeature than a useful shortcut; let's get rid of it (in HEAD only, there's no need to break any external callers in back branches).
Discussion: https://postgr.es/m/1865579.1738113...@sss.pgh.pa.us Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/ba0da16bd054de854c200a2dfa0b21c70e0300cf Modified Files -------------- src/backend/parser/parse_coerce.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-)