Subject: Tracing libpq client: Only with PQtrace()?

From: Sebastien Flaesch <[email-masked]>
Date: Tue, 9 Apr 2024 12:50:57 +0000

Hello

Sorry if I missed that in the doc:

Is the PQtrace() API the only way to enable libpq client tracing?

I thought about some environment variable of client configuration setting...

Seb

---

From: Greg Sabino Mullane <[email-masked]>
Date: Tue, 9 Apr 2024 10:50:11 -0400

> I thought about some environment variable of client configuration

That's generally the job of the client, or more specifically, the driver
providing the interface between your program and the libpq API. Unless you
are writing at the low level yourself, in which case, you would need to
have your program detect an env and call PQtrace() as needed.

See for example
https://metacpan.org/pod/DBD::Pg#parse_trace_flag-and-parse_trace_flags

Cheers,
Greg