Re: Insert with query

Поиск
Список
Период
Сортировка
Искать
От
Kevin Grittner
Тема
Re: Insert with query
Дата
в 13:32:13
Msg-id
1370007124.46479.YahooMailNeo@web162902.mail.bf1.yahoo.com
Ответ на
Insert with query (Juliano Amaral Chaves)
Список
Дерево обсуждения
Insert with query Juliano Amaral Chaves <juliano.amaral@hotmail.com>
Re: Insert with query Kevin Grittner <kgrittn@ymail.com>
Re: Insert with query Adrian Klaver <adrian.klaver@gmail.com>
Re: Insert with query Kevin Grittner <kgrittn@ymail.com>
Re: Insert with query Adrian Klaver <adrian.klaver@gmail.com>
Re: Insert with query Kevin Grittner <kgrittn@ymail.com>
Re: Insert with query Adrian Klaver <adrian.klaver@gmail.com>
Re: Insert with query Kevin Grittner <kgrittn@ymail.com>
Re: Insert with query Adrian Klaver <adrian.klaver@gmail.com>
Juliano Amaral Chaves  wrote:

> By doing insert into a table using a query, it seems that all
> records of consultation were included bypassing the AFTER INSERT
> triggers and as few as after all the records already included,
> the TRIGGER is fired for each record, I wonder if this occurrence
> is normal.
>
> I created an example that demonstrates my doubt, where the 1st
> case works properly. The 2nd case is restricted by TRIGGER when I
> think, that could not be

> [ example showing that an AFTER INSERT trigger sees the modified
>   table as of the state after the INSERT statement completes,
>   rather than the state after the insert of the individual row ]

I can see where that would be confusing, but things are operating
as designed, AFAICS.  The trigger fires after the statement, not
after each affected row is processed.

--
Kevin Grittner
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

В списке pgsql-general по дате отправления
От: Leif Jensen
Дата:
Сообщение: ECPG SET CONNECTION
От: Albe Laurenz
Дата:
FAQ