How to make the row changes inside trigger function visible to the top level sql statement?

Поиск
Список
Период
Сортировка
От haifeng liu
Тема How to make the row changes inside trigger function visible to the top level sql statement?
Дата
Msg-id 571AFDFA-85FB-4EF4-B811-F7722DE28F10@gmail.com
обсуждение исходный текст
Ответы Re: How to make the row changes inside trigger function visible to the top level sql statement?
Список pgsql-admin
Hello,

I am doing table partitioning, all is ok except that after executing 'insert' sql statement I can't get affected rows,
italways be 0. After searching on the documents, I found that row changes inside trigger function is not visible to the
toplevel statement. 

Partition table using a trigger function to redirect insertion to the correct partition is the recommend way, and test
affectedrows is also used frequently. pgAdmin do test the affected rows too, thus when I type a new row and click save
button,it seems failed but actually succeed. 

How can I make the row changes inside the trigger function visible to the top level statement?

Thank all in advance!

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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Data corruption after SAN snapshot
Следующее
От: karthi keyan
Дата:
Сообщение: Data migration to sql server 2008