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

From: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
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()?
Date: 2024-04-09 14:50:11
Message-ID: CAKAnmmKxUOcVk_NWVtxhRd_ks-MHKKt4hHU0Z+WTAkBEoLjC7w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Apr 9, 2024 at 8:51 AM Sebastien Flaesch <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

Cheers,
Greg

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thiemo Kellner 2024-04-09 14:59:38 [Code: 0, SQL State: 0A000] when "typing" from pg_catalog
Previous Message Sebastien Flaesch 2024-04-09 14:44:18 Re: prepared statement "cu1" already exists (but it does not)