psql: add \pset true/false - Mailing list pgsql-hackers

From Marko Tiikkaja
Subject psql: add \pset true/false
Date
Msg-id 56308F56.8060908@joh.to
Whole thread Raw
Responses Re: psql: add \pset true/false  (Robert Haas <robertmhaas@gmail.com>)
Re: psql: add \pset true/false  ("Daniel Verite" <daniel@manitou-mail.org>)
Re: psql: add \pset true/false  (Vik Fearing <vik@2ndquadrant.fr>)
List pgsql-hackers
Hello hello,

Since the default t/f output for booleans is not very user friendly,
attached is a patch which enables you to do for example the following:

=# \pset true TRUE
Boolean TRUE display is "TRUE".
=# \pset false FALSE
Boolean FALSE display is "FALSE".
=# select true, false;
   bool | bool
------+-------
   TRUE | FALSE
(1 row)


(For anyone reviewing: I didn't touch the parts of describe.c which do
this for nullPrint:

   myopt.nullPrint = NULL;

since I thought it was dubious in the first place, and I don't think we
output booleans in the describe commands.)



.m

Attachment

pgsql-hackers by date:

Previous
From: Victor Wagner
Date:
Subject: Re: Patch: Implement failover on libpq connect level.
Next
From: Andres Freund
Date:
Subject: Add EXTRA_CFLAGS to configure