I haven't had much luck trying to create a function from within libpqxx. I try calling exec with a string that contains the CREATE OR REPLACE function ... but I have never been able to get the syntax correct. Any tips or links? Thanks!
I am able to do it just passing the string "CREATE or REPLACE FUNCTION ..." via a pqxx::work.exec() call. I must have had bad syntax before. Thanks.