From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | equincerot(at)yahoo(dot)fr |
Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #17483: postgres_fdw used with text to_tsvector and custom search configuration |
Date: | 2022-05-16 14:49:36 |
Message-ID: | 1322024.1652712576@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
PG Bug reporting form <noreply(at)postgresql(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-05-16 15:21:21 | Re: BUG #17481: sometime pg_stat_statements coredump |
Previous Message | Tom Lane | 2022-05-16 14:38:21 | Re: BUG #17482: make world get error |