From: | PG Bug reporting form <noreply(at)postgresql(dot)org> |
---|---|
To: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Cc: | fpirotti(at)gmail(dot)com |
Subject: | BUG #15315: Trigger on foreign data wrapper (MYSQL) does not update columns not in set clause |
Date: | 2018-08-07 19:00:00 |
Message-ID: | 153366840006.1296.5658931833037906278@wrigleys.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged on the website:
Bug reference: 15315
Logged by: Francesco Pirotti
Email address: fpirotti(at)gmail(dot)com
PostgreSQL version: 9.6.7
Operating system: Debian Linux 8
Description:
I have a foreign table "t1" with two columns, "A" and "B" from mysql_fdw
foreign data wrapper.
I have created a trigger so that column B gets automatically a value when A
is updated
BEGIN
NEW.B := 'dummy value';
RETURN NEW;
END;
if I run the following query
update t1 set A='1'
column B does NOT update as per trigger.
if I run the following query
update t1 set A='1', B='a'
then column B correctly gets the 'dummy value' from the trigger function.
I created an identical table in postgresql (create table t2 as select * from
t1), so it is not foreign, and both updates work!
Thanks for your attention: PostgreSQL 9.6.7 on x86_64-pc-linux-gnu (Debian
9.6.7-1.pgdg80+1), compiled by gcc (Debian 4.9.2-10) 4.9.2, 64-bit
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-08-07 19:10:09 | Re: BUG #15271: Documentation / Error reporting on GUC parameter change |
Previous Message | Tom Lane | 2018-08-07 18:45:22 | Re: BUG #15312: Possible access to unintended variable in "postgres/src/backend/postmaster/pgstat.c" line 2698 |