On Tue, Mar 15, 2016 at 6:44 AM, Ashutosh Bapat <ashutosh.ba...@enterprisedb.com> wrote: > Here's patch which fixes the issue using Robert's idea.
Please at least check your patches with 'git diff --check' before submitting them. And where it's not too much trouble, pgindent them. Or at least make them look something like what pgindent would have produced, instead of having the line lengths be all over the place. -- change the session user to view_owner and execute the statement. Because of -- change in session user, the plan should get invalidated and created again. --- While creating the plan, it should throw error since there is no user mapping --- available for view_owner. +-- The join will not be pushed down since the joining relations do not have a +-- valid user mapping. Now what's going on here? It seems to me that either postgres_fdw requires a user mapping (in which case this ought to fail) or it doesn't (in which case this ought to push the join down). I don't understand how working but not pushing the join down can ever be the right behavior. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers