From: | Phil Sorber <phil(at)omniti(dot)com> |
---|---|
To: | PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | PATCH: psql boolean display |
Date: | 2012-08-19 16:02:31 |
Message-ID: | CADAkt-hQxXaAvrQXaFEomWZ0L+hB6T3rS0KmbbEq28sSLwpVwA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello all,
I am providing a patch to allow you to change the output of a boolean
value in psql much like you can do with NULL. A client requested this
feature and we thought it may appeal to someone else in the community.
The patch includes updated docs and a regression test. The code
changes themselves are pretty simple and straightforward.
Example from the regression test:
SELECT true, false;
bool | bool
------+------
t | f
(1 row)
\pset booltrue 'foo'
\pset boolfalse 'bar'
SELECT true, false;
bool | bool
------+------
foo | bar
(1 row)
\pset booltrue 't'
\pset boolfalse 'f'
SELECT true, false;
bool | bool
------+------
t | f
(1 row)
As always, comments welcome.
Thanks.
Attachment | Content-Type | Size |
---|---|---|
psql-bool-display.patch | application/octet-stream | 5.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-08-19 16:06:30 | Rules and WITH and LATERAL |
Previous Message | Peter Eisentraut | 2012-08-19 02:37:27 | Re: elog/ereport noreturn decoration |