Add \pset options for boolean value display - Mailing list pgsql-hackers

From David G. Johnston
Subject Add \pset options for boolean value display
Date
Msg-id CAKFQuwYts3vnfQ5AoKhEaKMTNMfJ443MW2kFswKwzn7fiofkrw@mail.gmail.com
Whole thread Raw
List pgsql-hackers
Hi!

Please accept this patch (though it's not finished, just functional)!

It's \pset null for boolean values

Printing tables of 't' and 'f' makes for painful-to-read output.  This provides an easy win for psql users, giving them the option to do better.  I would like all of our documentation examples eventually to be done with "\pset display_true true" and "\pset display_false false" configured.  Getting it into v18 so docs being written now, like my NULL patch, can make use of it, would make my year.

I was initially going to go with the following to mirror null even more closely.

\pset { true | false } value

And still like that option, though having the same word repeated as the expected value and name hurts it a bit.

This next one was also considered but the word "print" already seemed a bit too entwined with \pset format related stuff.

\pset { print_true | print_false } value

David J.

Attachment

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment
Next
From: Amit Kapila
Date:
Subject: Re: Separate GUC for replication origins