How to dump PGresult

两盒软妹~` 提交于 2020-01-16 01:13:52

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/32213441/how-to-dump-pgresult

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!