Re: Triggers in pgadmin query tools

Поиск
Список
Период
Сортировка
От Guillaume Lelarge
Тема Re: Triggers in pgadmin query tools
Дата
Msg-id 4D905269.7050108@lelarge.info
обсуждение исходный текст
Ответ на Re: Triggers in pgadmin query tools  (Francois Legrand <legrand@lpnhe.in2p3.fr>)
Ответы Re: Triggers in pgadmin query tools  (Francois Legrand <legrand@lpnhe.in2p3.fr>)
Список pgadmin-support
Le 28/03/2011 10:52, Francois Legrand a écrit :
> Hi all,
> Are triggers are fired "only once by connection" ?

They are fired as many times as needed.

> Here is my point.
> 
> I found a really strange behaviour of the pgadmin II with triggers.
> I activated the detailed logs on my server thus I could monitor
> everything, and the point is the following :
> 
> 1) I open the query tool
> 2) I do a first insert in my table ==> The trigger is fired
> 3) I do a second (and more) insert in my table ==> The trigger is NOT fired
> 4) I close the query tool and open it again and do an insert ==> the
> trigger is fired
> 
> Thus it appears that when I run several inserts from the query tool, the
> trigger is fired the first time but not anymore after.
> I found that this is exactly the same if I add lines directly from the
> "Edit data" window. The first line I add fire the trigger, but the
> others no.
> 
> Moreover, it is also the same from the psql tool.
> I open psql, do an insert : the trigger is fired. But if I do a second
> insert, the trigger is not fired.
> 
> *Thus it appears that triggers are fired "only once by connection" !*
> 
> I found that someone had the same problem
> (http://www.mail-archive.com/pgsql-general@postgresql.org/msg23094.html)
> 

This mail was sent in 2001, that's only ten years back. Things have
changed since (btw, I'm not saying it worked this way at this time).

> Is that normal ? Is it possible to fix that in the server configuration ?
> 

There's no configuration that would explain that behaviour. My guess is
that you have an issue with your trigger function. It would help to know
its content, and your PostgreSQL release.

BTW, this is more a PostgreSQL question, not a pgAdmin one.


-- 
Guillaumehttp://www.postgresql.frhttp://dalibo.com


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

Предыдущее
От: Francois Legrand
Дата:
Сообщение: Re: Triggers in pgadmin query tools
Следующее
От: Francois Legrand
Дата:
Сообщение: Re: Triggers in pgadmin query tools