Re: jsonb, collection & postgres_fdw

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: jsonb, collection & postgres_fdw
Дата
Msg-id 469809.1597338022@sss.pgh.pa.us
обсуждение исходный текст
Ответ на jsonb, collection & postgres_fdw  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
Ответы Re: jsonb, collection & postgres_fdw  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
Список pgsql-hackers
Konstantin Knizhnik <k.knizhnik@postgrespro.ru> writes:
> Right now jsonb functions are treated as non-shippable by postgres_fdw 
> and so predicates with them are not pushed down to foreign server:

Yeah, that's kind of annoying, but breaking the collation check
is not an acceptable fix.  And what you're proposing *does* break it.
The issue here is that the function's input collation is coming from
the default collation applied to the text constant, and we can't assume
that that will be the same on the remote side.

In reality, of course, jsonb_exists doesn't care about its input collation
--- but postgres_fdw has no way to know that.  I don't see any easy way
around that.

One idea that would probably work in a lot of postgres_fdw usage scenarios
is to have a foreign-server-level flag that says "all the collations on
that server behave the same as the local ones, and the default collation
is the same too", and then we just skip the collation checking altogether.
But I'm a bit worried that if someone mistakenly sets that flag, the
misbehavior will be very hard to detect.

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: run pgindent on a regular basis / scripted manner
Следующее
От: Konstantin Knizhnik
Дата:
Сообщение: Re: jsonb, collection & postgres_fdw