Re: Fix \crosstabview to honor \pset display_true/display_false - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: Fix \crosstabview to honor \pset display_true/display_false
Date
Msg-id CAKFQuwas75BCcjvEvxKxphG5itdJTkxap7SKLUD2jzqrrSXOig@mail.gmail.com
Whole thread
In response to Re: Fix \crosstabview to honor \pset display_true/display_false  (Álvaro Herrera <alvherre@kurilemu.de>)
Responses Re: Fix \crosstabview to honor \pset display_true/display_false
List 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.

pgsql-hackers by date:

Previous
From: Zsolt Parragi
Date:
Subject: Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements
Next
From: Zsolt Parragi
Date:
Subject: Re: More jsonpath methods: translate, split, join