Lists: | pgsql-general |
---|
From: | Henry House <hajhouse(at)houseag(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | setting display format of booleans in psql |
Date: | 2011-08-06 14:13:20 |
Message-ID: | 20110806141320.GJ8732@houseag.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
Is there a way to set the display format of boolean values in psql just
as one can set the display of nulls using \pset null <some string>? I
find presentation of true as 't' and false as 'f' rather poor since 't'
and 'f' do not look very different from each other. I'd like to instead
get 'TRUE' or 'FALSE'.
Nothing in the manual page for psql seems helpful.
From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Henry House <hajhouse(at)houseag(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: setting display format of booleans in psql |
Date: | 2011-08-06 18:02:45 |
Message-ID: | CAFj8pRAeAm7ZfCqGD=goj682xbSS2Bq2J7NoOfhBM9XvySr8+Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
Hello
there is not any possibility to change boolean output format.
Regards
Pavel Stehule
2011/8/6 Henry House <hajhouse(at)houseag(dot)com>:
> Is there a way to set the display format of boolean values in psql just
> as one can set the display of nulls using \pset null <some string>? I
> find presentation of true as 't' and false as 'f' rather poor since 't'
> and 'f' do not look very different from each other. I'd like to instead
> get 'TRUE' or 'FALSE'.
>
> Nothing in the manual page for psql seems helpful.
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
From: | Rob Sargent <robjsargent(at)gmail(dot)com> |
---|---|
To: | Henry House <hajhouse(at)houseag(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: setting display format of booleans in psql |
Date: | 2011-08-06 20:02:18 |
Message-ID: | 4E3D9DCA.1000108@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
Pavel Stehule wrote:
> Hello
>
> there is not any possibility to change boolean output format.
>
> Regards
>
> Pavel Stehule
>
> 2011/8/6 Henry House <hajhouse(at)houseag(dot)com>:
>
>> Is there a way to set the display format of boolean values in psql just
>> as one can set the display of nulls using \pset null <some string>? I
>> find presentation of true as 't' and false as 'f' rather poor since 't'
>> and 'f' do not look very different from each other. I'd like to instead
>> get 'TRUE' or 'FALSE'.
>>
>> Nothing in the manual page for psql seems helpful.
>>
>> --
>> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-general
>>
>>
>
But I'm sure you could write yourself a (non-volatile?) function which
would wrap your booleans whenever select * is NOT used.
select id, name, bw(isAlien) from individual;
create or replace function bw(boolean b)
returns char as &&
begin;
/ /if b then
return 'F';
else
return 'T';
end;
&&
etc.
return