Re: Which parts of src/backend/nodes/print.c are used?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Which parts of src/backend/nodes/print.c are used?
Date: 2023-12-04 13:50:47
Message-ID: 748488.1701697847@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(at)eisentraut(dot)org> writes:
> src/backend/nodes/print.c contains a number of functions that print node
> types, mostly to stdout. Most of these are not actually used anywhere
> in the code. Are they meant to be inserted into the code ad hoc for
> debugging? Is anyone using these?

Personally, I use pprint() a lot. (I invoke it manually from gdb and
then look into the postmaster log for results.) Its cousins such as
format_node_dump look like they were added by people with slightly
different tastes in output format, so they probably have a
constituency somewhere.

I tend to agree that print_rt() and the other tree-printing routines
below it (down to, but not including, print_slot) are not as useful
as invoking the outfuncs.c code; but others might think differently.
Sometimes you don't want all the gory detail.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas wen 2023-12-04 14:02:06 回复: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)
Previous Message John Naylor 2023-12-04 13:38:53 Re: Move bki file pre-processing from initdb - part 1 - initdb->genbki.pl