Re: Fix \crosstabview to honor \pset display_true/display_false
David G. Johnston <david.g.johnston@gmail.com>
From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Álvaro Herrera <alvherre@kurilemu.de>
Cc: Chao Li <li.evan.chao@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>,
Bruce Momjian <bmomjian@gmail.com>
Date: 2026-06-19T20:02:08Z
Lists: pgsql-hackers
On Fri, Jun 19, 2026 at 10:24 AM Álvaro Herrera <alvherre@kurilemu.de> wrote: > On 2026-Jun-19, David G. Johnston wrote: > > > Looked a bit closer at printQuery this time; disliking that the if > > condition has an awareness of the implementation of > > printQueryOptDisplayValue since it lists !isnull and ftype != BOOLOID > > explicitly. > > > > How about not touching print.c at all with this patch, moving the > > printQueryOptDisplayValue into crosstabview.c and leaving printQuery > alone > > since it is already correct? > > That was my reaction also, so I produced this POC patch. I think > print.h needs some more work, and that'd be only for 20. > > Chao's decision to include the row and column headers makes more sense to me. The promise of this feature is that the visual output of booleans as t/f should go away if the user chooses to make use of these local variables. While we may not be able get them all (e.g., composites and arrays) doing so here is trivial to accomplish. David J.
Commits
-
Make crosstabview honor boolean/null display settings
- 4df5fe3833a8 19 (unreleased) landed