Shouldn't IsBinaryCoercible accept targettype = ANYOID? - Mailing list pgsql-hackers

From Tom Lane
Subject Shouldn't IsBinaryCoercible accept targettype = ANYOID?
Date
Msg-id 18794.1387469646@sss.pgh.pa.us
Whole thread Raw
List pgsql-hackers
Whilst fooling with the WITHIN GROUP patch, I noticed that
IsBinaryCoercible() doesn't think that anything-to-ANY is a binary
coercion.  This was causing lookup_agg_function() to refuse to accept use
of support functions declared as taking ANY in aggregates with more
specific declared types.  For the moment I hacked it by special-casing ANY
in lookup_agg_function, but shouldn't IsBinaryCoercible() accept the case?

A quick look through the callers suggests that in most cases the
targettype couldn't be ANY anyway, but there are one or two other places
where we're checking binary coercibility to an operator or function's
declared input type, and in those cases allowing ANY seems like the right
thing.

If there are not objections, I'll change this along with the WITHIN GROUP
stuff.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: preserving forensic information when we freeze
Next
From: Fujii Masao
Date:
Subject: Re: ALTER SYSTEM SET command to change postgresql.conf parameters