Re: Fix \crosstabview to honor \pset display_true/display_false

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Cc: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Bruce Momjian <bmomjian(at)gmail(dot)com>
Subject: Re: Fix \crosstabview to honor \pset display_true/display_false
Date: 2026-06-19 20:02:08
Message-ID: CAKFQuwas75BCcjvEvxKxphG5itdJTkxap7SKLUD2jzqrrSXOig@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 19, 2026 at 10:24 AM Álvaro Herrera <alvherre(at)kurilemu(dot)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zsolt Parragi 2026-06-19 20:42:56 Re: More jsonpath methods: translate, split, join
Previous Message Zsolt Parragi 2026-06-19 19:45:12 Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements