Re: In which session context is a trigger run?

Поиск
Список
Период
Сортировка
От Mitar
Тема Re: In which session context is a trigger run?
Дата
Msg-id CAKLmikMyiYHzVtwVvuvU=nPJZFJcMNL9Qsc+3o6q=C9g8hH4Dw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: In which session context is a trigger run?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Ответы Re: In which session context is a trigger run?
Список pgsql-general
Hi!

On Fri, Dec 28, 2018 at 12:57 PM Adrian Klaver
<adrian.klaver@aklaver.com> wrote:
> > CREATE OR REPLACE FUNCTION pg_temp.my_function()
>
> And it does what?

Copies/transforms data from posts into posts_temp.

> > When a row is added to "posts" table outside of my session, function
> > "my_function" is called, but it seems it cannot access "posts_temp"
> > table. It seems that "my_function" is called in the session of the
>
> Temp tables can not be seen by other sessions.

Sure, but why is a temporary function used as a temporary trigger made
from my session not run inside my session? Then it could see a
temporary table made in my session.


Mitar

-- 
http://mitar.tnode.com/
https://twitter.com/mitar_m


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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: In which session context is a trigger run?
Следующее
От: patrick keshishian
Дата:
Сообщение: Re: libpq bug?