Reputation: 11
I'm writing a c++ postgres app using libpqxx. I have a postgres function that takes multiple text[] arrays as input parameters. Since I cannot find a way in libpqxx to pass in arrays to a function (any help here welcome!), I am instead using a "DO" block and building the arrays directly in the DO sql before calling the function. My problem is that the function inserts a row, and I need the id of the new row returned, but it seems like you can't return anything from a DO block. Is this true, and if so, any ideas? I really would like to get the id back within the transaction with the function call, but I don't see how I can do this. Any tips/help appreciated.
Upvotes: 0
Views: 64