Re: postgres_fdw, remote triggers and schemas

From: Thom Brown <thom(at)linux(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: postgres_fdw, remote triggers and schemas
Date: 2013-11-15 21:06:30
Message-ID: CAA-aLv6pSNvTvEtmpKK1iH5S-dS-jjdSsDiKfzWkmSuQkHEEtw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 15 November 2013 21:03, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Thom Brown <thom(at)linux(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2013-11-15 21:11:46 Re: Turning recovery.conf into GUCs
Previous Message David Rowley 2013-11-15 21:05:10 Re: pg_dump insert with column names speedup