public inbox for [email protected]  
help / color / mirror / Atom feed
Re: Notices not printed by PQtrace
2+ messages / 2 participants
[nested] [flat]

* Re: Notices not printed by PQtrace
@ 2025-08-05 13:17  Álvaro Herrera <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Álvaro Herrera @ 2025-08-05 13:17 UTC (permalink / raw)
  To: Dominique Devienne <[email protected]>; +Cc: [email protected]

On 2025-Aug-05, Dominique Devienne wrote:

> Hi. I'm using PQtrace for client-side tracing with PQtrace,
> which I thought was showing protocol messages in details.
> 
> But turns out that RAISE notices from PL/pgSQL are not there.

Hmm, don't they show up as NOTICE messages?  I think they should.
Maybe you could set a notice receiver and have it print to the same
file?  I think I had to do that at some point.

> And to think about it, I wonder whether NOTIFY messages are there too.

Please test it and let's us know :-)

> Are these oversights?

Yeah, probably.  As far as I am concerned, the current PQtrace() code
was mostly written to allow us to develop libpq pipeline mode.  (I don't
know what had Aya Iwata in mind when she wrote it.)  For that, neither
NOTICE nor NOTIFY were very interesting, so I didn't stop to think about
them.

> Any chance this could be enhanced, via new opt-in PQsetTraceFlags flags?
> Ideally I've like to see everything.

Yeah, I think that makes sense.  Feel free to propose a patch.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"In Europe they call me Niklaus Wirth; in the US they call me Nickel's worth.
 That's because in Europe they call me by name, and in the US by value!"






^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Notices not printed by PQtrace
@ 2025-08-05 14:19  Dominique Devienne <[email protected]>
  parent: Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Dominique Devienne @ 2025-08-05 14:19 UTC (permalink / raw)
  To: Álvaro Herrera <[email protected]>; +Cc: [email protected]

On Tue, Aug 5, 2025 at 3:20 PM Álvaro Herrera <[email protected]> wrote:
> On 2025-Aug-05, Dominique Devienne wrote:
> Yeah, I think that makes sense.  Feel free to propose a patch.

OK, fair enough. If I ever do (fat chances), I'd add another opt-in flag
to make the trace machine readable (see my older thread about that).

Thanks Alvaro.

PS: I have my own notice handler for my CLI already.
But that goes to my CLI's stdout, not the trace file.






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2025-08-05 14:19 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-08-05 13:17 Re: Notices not printed by PQtrace Álvaro Herrera <[email protected]>
2025-08-05 14:19 ` Dominique Devienne <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox