.hmmessage P
{margin:0px;padding:0px;}
body.hmmessage
{font-size:10pt;font-family:Verdana;}
Hello,
I'm starting to learn programming with libpq. In the main loop of my code, I will receive some data in the format of an array of a struct. The data will be inserted to the database, in different lines. I also need to update the last record in the table before the insertion. So I plan to write a pl/pgsql function (procedure) to perform the whole updating and inserting. But I don't know how to pass the array to the procedure through libpq. It seems the only way is to using libpq to do updating and inserting separately. Like this