Re: [BUGS] Error of insert Foreign table with postgres_fdw

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [BUGS] Error of insert Foreign table with postgres_fdw
Дата
Msg-id 20776.1502111966@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [BUGS] Error of insert Foreign table with postgres_fdw  (Jaimin Pan <jaimin.pan@gmail.com>)
Ответы Re: [BUGS] Error of insert Foreign table with postgres_fdw
Список pgsql-bugs
Jaimin Pan <jaimin.pan@gmail.com> writes:
> I got error when insert a parent table by inserting a foreign table.
> ...
> (create trigger "phone_pool_insert_trigger" for phone_pool and insert into
> phone_pool works well. The child table got the row.)

> when insert into phone_pool_foreign. I got error like following.
> ERROR:  relation "ph_90" does not exist
> CONTEXT:  Remote SQL command: INSERT INTO public. phone_pool_foreign(id,
> patrition, phone, carrier, createtime, updatetime, deleteflg) VALUES ($1,
> $2, $3, $4, $5, $6, $7)
> PL/pgSQL function public.phone_pool_insert_trigger() line 93 at SQL
> statement
> """

You didn't show us either the whole trigger or the failing statement in
it, but I bet you forgot to schema-qualify the child table names.
postgres_fdw runs the remote session with a very restrictive search_path,
just pg_catalog if memory serves.  It's generally bad practice for
triggers to rely on the prevailing search path in any case.
        regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Euler Taveira
Дата:
Сообщение: Re: [BUGS] BUG #14771: "Logical decoding" does not cover the impactof "TRUNCATE TABLE" command
Следующее
От: "Daniel Verite"
Дата:
Сообщение: Re: [BUGS] Crash report for some ICU-52 (debian8) COLLATE andwork_mem values