postgresql_fdw issues with triggers on the foreign tables

Поиск
Список
Период
Сортировка
От Eelke Klein
Тема postgresql_fdw issues with triggers on the foreign tables
Дата
Msg-id CALEkvvxfwRsAf7VP7EVCwZJvufJeEboc6jKiajXumo+N18xc=g@mail.gmail.com
обсуждение исходный текст
Ответы Re: postgresql_fdw issues with triggers on the foreign tables  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Re: postgresql_fdw issues with triggers on the foreign tables  (Igor Neyman <ineyman@perceptron.com>)
Список pgsql-general

I'm experimenting with using foreign data wrappers to get data from one database to another. Most things work perfectly but I am encountering two issues with triggers on the foreign tables.

The first one is when a query triggers a trigger on the foreign table the trigger doesn't have any search_path. Not even a select on a table in public will work from the trigger unless I specify the schema name.

The second problem has to do with DEFAULT values. One of the tables i'm inserting data on has a column called id of type bigserial. This column is not filled by the INSERT statement I'm using so should use it's default which is nextval('...'::regclass); However in the BEFORE INSERT trigger the value of NEW.id IS NULL while normally it would already be assigned a value from the sequence.

The issues with the triggers do not occur when they are triggered by statements executed directly on the database. Only when the statements come from the FDW I have these issues.


The "local" database is version 9.3.3 x64 windows from EnterpriseDB
The foreign database is version 9.3.2 x64 freebsd 10 clang3.3

Regards, Eelke

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

Предыдущее
От: "Tomas Vondra"
Дата:
Сообщение: Re: question about memory usage
Следующее
От: Bill Moran
Дата:
Сообщение: Re: Index usage with slow query