Update foreign table with trigger - Mailing list pgsql-general

From Leonardo M. Ramé
Subject Update foreign table with trigger
Date
Msg-id 56D099A0.8040405@griensu.com
Whole thread Raw
Responses Re: Update foreign table with trigger  (John R Pierce <pierce@hogranch.com>)
List pgsql-general
Hi, I created a Postgres_FDW table (TABLE_A) and need to do an update on
that table.

As TABLE_A has a trigger, and the trigger does an insert on another
table (TABLE_B), I had to create another foreign table called TABLE_B,
that's ok.

At this point I have two foreign tables, TABLE_A and TABLE_B.

Now, when I try to do an update on TABLE_A, I get relation "TABLE_B"
does not exist.

Here's what I get:

update TABLE_A set updated=true where id=1234;

ERROR:  relation "TABLE_B" does not exist
CONTEXT:  Remote SQL command: UPDATE public.TABLE_A SET updated = $2
WHERE ctid = $1
PL/pgSQL function public.TABLE_A_update() line 4 at SQL statement

Any hint?.


Regards
--
Leonardo M. Ramé
Medical IT - Griensu S.A.
Av. Colón 636 - Piso 8 Of. A
X5000EPT -- Córdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 (011) 40871877


pgsql-general by date:

Previous
From: Joe Conway
Date:
Subject: Re: Privileges granted on dblink extension function do not survive database dump and restore
Next
From: Jerry Sievers
Date:
Subject: Re: Privileges granted on dblink extension function do not survive database dump and restore