Konstantin Knizhnik <k.knizhnik@postgrespro.ru> writes:
> Or funccollid=0 doesn't mean that collations of function arguments do
> not affect function behavior?
No, it does not. As I said already, there is no way to tell from outside
a function whether it pays attention to collation or not. funccollid
is the collation to ascribe to the function's *output*, but that's always
zero for a non-collatable output type such as boolean. An example
is text_lt(), which returns boolean but surely does depend on the input
collation. We don't really have any way to distinguish between that and
jsonb_exists().
In hindsight, it was probably a bad idea not to have a way to mark whether
functions care about collation. I don't know if it'd be practical to
retrofit such a marker now.
regards, tom lane