Thread: What is the C function to modify attribute

What is the C function to modify attribute

From
"a"
Date:
Hi:

I am writing a trigger that will record all adjustment of the row into the last column of the row. I have done a iterator to produce text record and the last step would be add the text record into the last column (which designed as an array of user defined type, with the output function display the abstraction of update and a user defined function is used to retrieve detail update info). 

Now I would like to find a way that will allow me to update the last column in C efficiently.

Can anyone help? Thank you so much!!

Shore

Re: What is the C function to modify attribute

From
David Rowley
Date:
On 17 May 2018 at 15:36, a <372660931@qq.com> wrote:
> I am writing a trigger that will record all adjustment of the row into the
> last column of the row. I have done a iterator to produce text record and
> the last step would be add the text record into the last column (which
> designed as an array of user defined type, with the output function display
> the abstraction of update and a user defined function is used to retrieve
> detail update info).
>
> Now I would like to find a way that will allow me to update the last column
> in C efficiently.
>
> Can anyone help? Thank you so much!!

You might find https://www.postgresql.org/docs/10/static/triggers.html useful.

There's a complete example of a trigger function written in C there.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services