From: | Robert Haas <rhaas(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: When WCOs are present, disable direct foreign table modification |
Date: | 2017-07-24 20:25:41 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
When WCOs are present, disable direct foreign table modification.
If the user modifies a view that has CHECK OPTIONs and this gets
translated into a modification to an underlying relation which happens
to be a foreign table, the check options should be enforced. In the
normal code path, that was happening properly, but it was not working
properly for "direct" modification because the whole operation gets
pushed to the remote side in that case and we never have an option to
enforce the constraint against individual tuples. Fix by disabling
direct modification when there is a need to enforce CHECK OPTIONs.
Etsuro Fujita, reviewed by Kyotaro Horiguchi and by me.
Discussion: http://postgr.es/m/[email protected]
Branch
------
REL9_6_STABLE
Modified Files
--------------
contrib/postgres_fdw/expected/postgres_fdw.out | 60 ++++++++++++++++++++++++++
contrib/postgres_fdw/sql/postgres_fdw.sql | 24 +++++++++++
doc/src/sgml/postgres-fdw.sgml | 6 ++-
src/backend/optimizer/plan/createplan.c | 7 ++-
4 files changed, 93 insertions(+), 4 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-07-24 20:46:25 | pgsql: Fix race condition in predicate-lock init code in EXEC_BACKEND b |
Previous Message | Tom Lane | 2017-07-24 19:17:05 | pgsql: Ensure that pg_get_ruledef()'s output matches pg_get_viewdef()'s |