Re: Fallback behavior for "UNKNOWN" types -- proposed change - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fallback behavior for "UNKNOWN" types -- proposed change
Date
Msg-id 23217.972420761@sss.pgh.pa.us
Whole thread Raw
In response to Fallback behavior for "UNKNOWN" types -- proposed change  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
List pgsql-hackers
Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
> I propose that we modify the heuristic slightly, so that if there are
> function matches with arguments from different categories, and if one or
> more of the possible matches comes from the "string" category, then that
> category is preferred.

I would suggest a slightly different rule, but maybe it comes out at the
same place in the end: if we can't find a unique match treating UNKNOWN
the way we do now, try again assuming it is TEXT (or at least string
category).  As you say, this is reasonable given that the original
literal looked like a string.

BTW, I have been thinking that numeric literals ought to be initially
assigned a new pseudo-type "UNKNOWNNUMERIC", which would eventually
get coerced to one specific numeric type along the same lines as type
assignment for string literals.  This looks like it might help deal
with the problems of float8 vs. numeric, etc.  Don't have a complete
proposal worked out yet, though.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Larry Rosenman
Date:
Subject: looks like we forgot something...
Next
From: richard excite
Date:
Subject: Re: Two-phase commit