Re: Boolean internal representation - Mailing list pgsql-general

From Bruce Momjian
Subject Re: Boolean internal representation
Date
Msg-id 200209190033.g8J0X4h17166@candle.pha.pa.us
Whole thread Raw
In response to Boolean internal representation  (Garo Hussenjian <garo@xapnet.com>)
Responses Re: Boolean internal representation  (Martijn van Oosterhout <kleptog@svana.org>)
List 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@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-general by date:

Previous
From: Garo Hussenjian
Date:
Subject: Boolean internal representation
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Boolean internal representation