I developed a function plpgsql that takes in an xml argument, parses the xmls and inserts into corresponding tables. It returns void after it finishes. I can co select functionname('xml string');
This will parse 'xml string' and insert into the destination table(s).
I want to invoke this using libpq.
const char *paramValues[1];
paramValues[0] = s.ptr;
char *stm = "select schema.LoadXML($1::xml)";
PGresult *res = PQexecParams(conn, stm, 1, NULL, paramValues, NULL, NULL, 0);
I was unable to find any example show how to invoke a function taking parameters.
Thanks in advance.
kd