Re: jsonb, collection & postgres_fdw - Mailing list pgsql-hackers

From Tom Lane
Subject Re: jsonb, collection & postgres_fdw
Date
Msg-id 498601.1597341860@sss.pgh.pa.us
Whole thread Raw
In response to Re: jsonb, collection & postgres_fdw  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Konstantin Knizhnik
Date:
Subject: Re: jsonb, collection & postgres_fdw
Next
From: Robert Haas
Date:
Subject: Re: recovering from "found xmin ... from before relfrozenxid ..."