Re: Boolean internal representation

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Garo Hussenjian <garo(at)xapnet(dot)com>
Cc: Postgresql General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Boolean internal representation
Date: 2002-09-19 00:33:04
Message-ID: 200209190033.g8J0X4h17166@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Garo Hussenjian wrote:
> Is there a way to always return booleans as 1/0 instead of t/f, without
> using a CASE statement...

How do you feel about a plpgsql function that does it:

SELECT print01(boolcol) FROM ...

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2002-09-19 00:45:26 Re: Boolean internal representation
Previous Message Garo Hussenjian 2002-09-19 00:27:56 Boolean internal representation