I am trying to debug my C program that accesses a postgres database.
I would like to dump the contents of PGresult using some postgres provided routine, where the PGresult is from a command that is not a SELECT.
Is there a postgres provided routine that will dump PGresult in a human readable way?
I will add that as an option to the logging that will dump the contents of PGresult.
I previously asked this question: How to dump PGresult and the answer is good for SELECTs, but it is not good for other commands.
[edit] I am looking to dump it for debugging purposes. So, if I set logging to debug level, I would like to see whatever information is in PGreturn. I am hoping there is some function that will do this. I also hope it trims out information that is not relevant. I have not looked at the Postgres source code to see what is available.