Re: BUG #17483: postgres_fdw used with text to_tsvector and custom search configuration - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #17483: postgres_fdw used with text to_tsvector and custom search configuration
Date
Msg-id 1322024.1652712576@sss.pgh.pa.us
Whole thread Raw
In response to BUG #17483: postgres_fdw used with text to_tsvector and custom search configuration  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #17483: postgres_fdw used with text to_tsvector and custom search configuration
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #17482: make world get error
Next
From: Tom Lane
Date:
Subject: Re: BUG #17481: sometime pg_stat_statements coredump