Re: Boolean output format - Mailing list pgsql-general

From Doug McNaught
Subject Re: Boolean output format
Date
Msg-id m3d6qpocc2.fsf@varsoon.wireboard.com
Whole thread Raw
In response to Re: Boolean output format  (Garo Hussenjian <garo@xapnet.com>)
Responses Re: Boolean output format
List pgsql-general
Garo Hussenjian <garo@xapnet.com> writes:

> Thanks, Jeff.
>
> The problem is that this would require that I rewrite many queries to
> utilize the function... I'm currently using smallint to store the bools
> because I want 0/1 as output. I'd like to move away from this but in php "f"
> evaluates true!

The database adapters I've used (Perl DBI and Java JDBC) arrange for
Boolean columns in query output to resolve as "true" or "false"
according to that language's conventions.  If the PHP adapter doesn't
do this, someone needs to fix it IMHO.  Different DBs have different
conventions about a lot of things and the adapters need to cope.

-Doug

pgsql-general by date:

Previous
From: Garo Hussenjian
Date:
Subject: Re: Boolean output format
Next
From: Tom Lane
Date:
Subject: Re: LISTEN/NOTIFY