... > The problem seems to be that when parse_func looks for "exact match" > operators, it doesn't consider numeric to be an exact match for mydom. > So that heuristic fails and we're left with no unique best choice for > the operator.
Sure. At the moment there is no reason for parse_func to think that mydom is anything, right? > I'm not sure if there's anything much that can be done about this. Something has to be done ;) > We could treat exact and binary-compatible matches alike (doesn't seem > good), or put a special case into the operator selection rules to reduce > domains to their basetypes before making the "exact match" test. > Neither of these seem real appealing, but if we don't do something > I think that domains are going to be a big pain in the neck to use. There could also be an explicit heuristic *after* the exact match gathering to look for an exact match for domains reduced to their base types. Is there any reason to look for domains before that? - Thomas ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org