I am writing an application where client nodes access a postgres database via an intermediary application. The clients cannot query the database directly; instead the intermediary application receives queries from the clients over a network, runs them, and relays the results.
libpqxx's pqxx::result, pqxx::row and pqx::field classes provides many conversion routines that allow the results of queries to be translated into c++ variables. I'd like my client application to make use of these, but that requires somehow either transferring the pqxx objects over the network, or sending the underlying "flexible textual format", and constructing pqxx objects from this on the client.
'Textual data' is generally simple enough to send over a network, but I can't see any way to access it from the pqxx::result objects, or any way to construct pqxx objects from that data were I able to access and transfer it. Is there any way to do this?