c - 如何转储 PGresult

标签 c postgresql libpq

我正在尝试调试访问 postgres 数据库的 C 程序。

我想使用一些 postgres 提供的例程转储 PGresult 的内容。

是否有 postgres 提供的例程以人类可读的方式转储 PGresult?

我会将其作为一个选项添加到将转储 PGresult 内容的日志记录中。

这是非 SELECT 命令的相关问题: How to dump PGresult for non-SELECT commands

最佳答案

src/interfaces/libpq/fe-print.c中有一个公共(public)函数PQprint;这是in the manual .

关于c - 如何转储 PGresult,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32213441/

相关文章:

python - AWS API 网关和 Lambda - API 分页

sql - 创建更新 View sql错误的规则

database - postgreSQL 嵌套查询执行缓慢

分配 const char* const 缓冲区时,C++ 应用程序崩溃

postgresql - 如何使用 PostgreSQL C 库 (libpq) 访问 HSTORE 列?

c - Linux 内核 filp_open 失败并显示 NOENT

c - 如何从 parent 向 child 发送信号 SIGUSR1 和 SIGUSR2?

我可以在C语言中对一个文件描述符调用两次shutdown吗?

sql - PostgreSQL 的 libpq 和 SELECT FROM

c - 在 makefile 中,如何使规则中的变量成为全局变量?