"Yasuo Ohgaki" <[EMAIL PROTECTED]> wrote in message
> Matthew Newby wrote:
> > I am having trouble with the pg_fetch_result function when trying to
> > a boolean field in a PostgreSQL database.  Here's the code snippet:
> It's a spec.
> PostgresSQL's boolean is returned as 't' or 'f' and both are string.
> Test as string.
> --
> Yasuo Ohgaki

Many thanks for the info. I "discovered" that test yesterday. However, if
that is indeed the way I should test it, then something probably needs to
change in the PHP docs. On the page
http://www.php.net/manual/en/function.pg-fetch-result.php it explicitly

"PostgreSQL has many built in types and only the basic ones are directly
supported here. All forms of integer, boolean and void types are returned as
integer values. All forms of float, and real types are returned as float
values. All other types, including arrays are returned as strings formatted
in the same default PostgreSQL manner that you would see in the psql

However, it appears that booleans are NOT returned as integer types, but
rather as single character 't' or 'f', at least as far as PHP is concerned.



PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to