Re: BUG #17483: postgres_fdw used with text to_tsvector and custom search configuration

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #17483: postgres_fdw used with text to_tsvector and custom search configuration
Дата
Msg-id 1322024.1652712576@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #17483: postgres_fdw used with text to_tsvector and custom search configuration  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #17483: postgres_fdw used with text to_tsvector and custom search configuration  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> I have an issue with the evaluation of to_tsvector and custom search
> configuration through foreign data wrapper (from PG to PG).

There is no chance whatsoever of a to_tsvector call working in a
foreign query unless the referenced text search config exists
(with identical definitions) on both ends.  It has to exist locally
or the parser will not be able to make sense of the command.  It
has to exist remotely if you'd like the operation to be pushed down
to the remote.  (Given the large potential for user error there,
I'm a bit worried that we should never have marked this function
safe-to-ship in the first place.)

The other thing you're running into is that if the text search
config isn't defined in the pg_catalog schema, it's not visible
in the restricted search path that the remote session will use.
The query shipped to the far end should handle that by writing
"'public.custom_search'::regconfig", but it evidently doesn't ---
that feels like a bug, indeed.

Or perhaps we ought to reduce the error hazards a bit by not
shipping query conditions that involve non-built-in configurations?
But likely that would draw performance complaints.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #17482: make world get error
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #17481: sometime pg_stat_statements coredump