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

From: Sebastien Flaesch <sebastien(dot)flaesch(at)4js(dot)com>
To: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Tracing libpq client: Only with PQtrace()?
Date: 2024-04-09 15:32:29
Message-ID: AM9P191MB1286B884F6C9B0263A0FFEDDB0072@AM9P191MB1286.EURP191.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Yep I got it, thanks for the suggestion!
Seb
________________________________
From: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
Sent: Tuesday, April 9, 2024 4:50 PM
To: Sebastien Flaesch <sebastien(dot)flaesch(at)4js(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Tracing libpq client: Only with PQtrace()?

EXTERNAL: Do not click links or open attachments if you do not recognize the sender.

On Tue, Apr 9, 2024 at 8:51 AM Sebastien Flaesch <sebastien(dot)flaesch(at)4js(dot)com<mailto:sebastien(dot)flaesch(at)4js(dot)com>> wrote:
Is the PQtrace() API the only way to enable libpq client tracing?

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

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<https://urldefense.com/v3/__https://metacpan.org/pod/DBD::Pg*parse_trace_flag-and-parse_trace_flags__;Iw!!I_DbfM1H!CShCRGSMCXDnZkZhChWyuMkn2offRsd-E0IeowBRQDEXbGIcpIs0rTpnx_2a79rrfeQkcbMbt2QCBlKrmHtlFw$>

Cheers,
Greg

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lok P 2024-04-09 15:43:54 Issue with date/timezone conversion function
Previous Message Adrian Klaver 2024-04-09 15:18:48 Re: [Code: 0, SQL State: 0A000] when "typing" from pg_catalog