Re: jsonb, collection & postgres_fdw

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: jsonb, collection & postgres_fdw
Date: 2020-08-13 18:04:20
Message-ID: 498601.1597341860@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2020-08-13 19:03:16 Re: recovering from "found xmin ... from before relfrozenxid ..."
Previous Message Konstantin Knizhnik 2020-08-13 17:46:31 Re: jsonb, collection & postgres_fdw