Re: BUG #15552: Unexpected error in COPY to a foreign table in atransaction

Поиск
Список
Период
Сортировка
От Luis Carril
Тема Re: BUG #15552: Unexpected error in COPY to a foreign table in atransaction
Дата
Msg-id LEJPR01MB0010045B9CE96FB2A142E529E7BE0@LEJPR01MB0010.DEUPRD01.PROD.OUTLOOK.DE
обсуждение исходный текст
Ответ на Re: BUG #15552: Unexpected error in COPY to a foreign table in atransaction  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: BUG #15552: Unexpected error in COPY to a foreign table in a transaction  (Amit Langote <amitlangote09@gmail.com>)
Список pgsql-bugs

Hi,

   I was not able to reproduce the error reported by Etsuro, for me on HEAD:

psql (12devel)
Type "help" for help.

postgres=# create table instead_of_insert_tbl(id serial, name text);
ERROR:  relation "instead_of_insert_tbl" already exists
postgres=#
postgres=# begin;
BEGIN
postgres=#
postgres=# create view instead_of_insert_tbl_view as select ''::text as str;
CREATE VIEW
postgres=#
postgres=# create function fun_instead_of_insert_tbl() returns trigger
postgres-# as $$ begin insert into instead_of_insert_tbl (name) values (new.str); return
postgres$# null; end;
postgres$# $$ language plpgsql;
CREATE FUNCTION
postgres=#
postgres=# create trigger trig_instead_of_insert_tbl_view instead of
postgres-# insert on instead_of_insert_tbl_view for each row execute procedure
postgres-# fun_instead_of_insert_tbl();
CREATE TRIGGER
postgres=#
postgres=# copy instead_of_insert_tbl_view from stdin;
Enter data to be copied followed by a newline.
End with a backslash and a period on a line by itself, or an EOF signal.
>> test1
>> \.
COPY 1

   

   Also, I created the CF entry with Michael's patch, following Amit's indications.


Cheers
Luis M Carril

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #15552: Unexpected error in COPY to a foreign table in atransaction
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Undefined symbol error - psql CLI client