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

Поиск
Список
Период
Сортировка
От Haifeng Liu
Тема Re: How to make the row changes inside trigger function visible to the top level sql statement?
Дата
Msg-id BLU0-SMTP279DBCEEDD4356D2F02A06DB9CC0@phx.gbl
обсуждение исходный текст
Ответ на Re: How to make the row changes inside trigger function visible to the top level sql statement?  (Sergey Konoplev <sergey.konoplev@postgresql-consulting.com>)
Список pgsql-admin
On Aug 9, 2012, at 7:11 PM, Sergey Konoplev <sergey.konoplev@postgresql-consulting.com> wrote:

> On Thu, Aug 9, 2012 at 2:53 PM, Sergey Konoplev
> <sergey.konoplev@postgresql-consulting.com> wrote:
>>> How can I make the row changes inside the trigger function visible to the top level statement?
>>
>> your redirecting function is okay. However the only way to get the
>> inserted row back is to do it from a subsequent statement in the
>> partitioning case.
>
> BTW I am not completely correct here. There is a solution but it is a
> tricky one https://gist.github.com/59067. I am not sure if it is a
> good performing one but it will work.

I don't think it's a good solution for a partitioned table. Any how, thank you for the information.

>
>> In your application you can use LISTEN/NOTIFY if you need to get some
>> specific information from trigger BTW. May be it will help somehow.
>>
>> --
>> Sergey Konoplev
>>
>> a database architect, software developer at PostgreSQL-Consulting.com
>> http://www.postgresql-consulting.com
>>
>> Jabber: gray.ru@gmail.com Skype: gray-hemp Phone: +79160686204
>
>
>
> --
> Sergey Konoplev
>
> a database architect, software developer at PostgreSQL-Consulting.com
> http://www.postgresql-consulting.com
>
> Jabber: gray.ru@gmail.com Skype: gray-hemp Phone: +79160686204
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>


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

Предыдущее
От: Sergey Konoplev
Дата:
Сообщение: Re: How to make the row changes inside trigger function visible to the top level sql statement?
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Data migration to sql server 2008