Is it possible to get the names or (Oid's) for all queried tables with libpq? If there exists a generic standard SQL way i would prefer it.

有帮助吗?

解决方案

It's not standard, but the Postgres EXPLAIN command can give you (more than) what you want.

http://www.postgresql.org/docs/9.3/static/sql-explain.html

If you use the JSON output format, the table names are found in the "Relation Name" attributes of the "Plan" objects.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top