From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Garo Hussenjian <garo(at)xapnet(dot)com>, Postgresql General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Boolean internal representation |
Date: | 2002-09-19 00:45:26 |
Message-ID: | 20020919004526.GA21448@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Sep 18, 2002 at 08:33:04PM -0400, Bruce Momjian wrote:
> 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 ...
Interestinly, if you use Perl DBI, it translates t/f to 1/0 for you. Very
annoying if you're not expecting it to :)
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.
From | Date | Subject | |
---|---|---|---|
Next Message | Marc G. Fournier | 2002-09-19 01:28:52 | Re: [HACKERS] PGXLOG variable worthwhile? |
Previous Message | Bruce Momjian | 2002-09-19 00:33:04 | Re: Boolean internal representation |