Re: Boolean output format

From: Doug McNaught <doug(at)wireboard(dot)com>
To: Garo Hussenjian <garo(at)xapnet(dot)com>
Cc: Jeff Davis <list-pgsql-general(at)empires(dot)org>, Postgresql General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Boolean output format
Date: 2002-10-05 02:21:01
Message-ID: m3d6qpocc2.fsf@varsoon.wireboard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Garo Hussenjian <garo(at)xapnet(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-10-05 02:54:02 Re: LISTEN/NOTIFY
Previous Message Garo Hussenjian 2002-10-05 01:58:32 Re: Boolean output format