1

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.

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.

Here is a related question for non-SELECT commands: How to dump PGresult for non-SELECT commands

Community
  • 1
  • 1
Be Kind To New Users
  • 9,672
  • 13
  • 78
  • 125

1 Answers1

1

In src/interfaces/libpq/fe-print.c there is a public function PQprint; it's in the manual.

Craig Ringer
  • 307,061
  • 76
  • 688
  • 778