On 15 November 2013 21:03, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Thom Brown <thom@linux.com> writes:
>> Is this unintended, or is it something users should fix themselves by
>> being explicit about relation schemas in trigger functions? Should
>> the schema search path instead pick up whatever the default would be
>> for the user being used for the connection?
>
> postgres_fdw intentionally runs the remote session with a very minimal
> search_path (I think just pg_catalog, in fact). I would argue that
> any trigger that breaks because of that is broken anyway, since it
> would fail --- possibly with security implications --- if some ordinary
> user modified the search path.
That makes sense. Would it be worth putting a note in the
documentation about the behaviour of the search path on the
postgres_fdw page?
--
Thom