Re: [HACKERS] postgres_fdw, remote triggers and schemas

2013-11-15 Thread Thom Brown
On 15 November 2013 21:03, Tom Lane wrote: > Thom Brown 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 b

Re: [HACKERS] postgres_fdw, remote triggers and schemas

2013-11-15 Thread Tom Lane
Thom Brown writes: > I've observed an issue whereby a parent table with a trigger that > redirects inserts to a child table fails to run the trigger > successfully if written to using a foreign table: That trigger is making unsafe assumptions about what search_path it's run under. If you don't w

[HACKERS] postgres_fdw, remote triggers and schemas

2013-11-15 Thread Thom Brown
Hi, I've observed an issue whereby a parent table with a trigger that redirects inserts to a child table fails to run the trigger successfully if written to using a foreign table: Example: Database 1: CREATE TABLE parent (id int, content text); CREATE TABLE child () INHERITS (parent); CREATE