How to make data changes inside trigger function visible to the top level statement ? - Mailing list pgsql-admin

From Haifeng Liu
Subject How to make data changes inside trigger function visible to the top level statement ?
Date
Msg-id BLU0-SMTP1653FF4F215A5C2BE7B8F44B9CF0@phx.gbl
Whole thread Raw
Responses Re: How to make data changes inside trigger function visible to the top level statement ?
List 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
affectedrows testing is also used widely. pgAdmin tests the affected rows too, thus when I type a new row and click
savebutton, 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 by date:

Previous
From: Nathan Wagner
Date:
Subject: O
Next
From: Craig Ringer
Date:
Subject: Re: How to make data changes inside trigger function visible to the top level statement ?