[Libpqxx-general] "Posting" a call to a pl/pgSQL function using libpqxx

Peter Geoghegan peter.geoghegan86 at gmail.com
Thu Jun 5 10:24:09 UTC 2008


Hello,

I am writing an application that requires that I call a pl/pgSQL
function, which performs a potentially lengthy operation. That
function returns void. I am not interested in the result of that
function, and it should never throw an exception.

I'd like to avoid having to wait for that function to return - in
effect, I'd like to "post" a call to the function, because not doing
so could cause my application to stall for an annoyingly long time.
I've thought of creating a pqxx "back burner" thread, but this would
necessitate adopting all of my existing code to it, and in any case,
the simplest solution is preferable. I hope the back burner thread
doesn't turn out to be the simplest solution, because, absolutely, it
isn't all that simple!

I'm using one nontransaction throughout the application, because any
operation that requires transactional integrity (i.e anything that
will be committed) occurs within a pl/pgSQL function, which gets me
that integrity anyway.

Any help or insights are greatly appreciated,

Regards,
Peter Geoghegan


More information about the Libpqxx-general mailing list