A boolean value is returned as the strings 't' and 'f', not the
constants true and false.  This presents all kinds of interesting
oddities for code that does something like:

I suspect that behavior has nothing to do with PHP and everything to do with PostgreSQL. Each DBMS outputs their information in their own way.

Now, should PHP implement a new standard to convert that into a
standard format, well that's another question.  The answer is "no."
That would cause compatibility problems.

Bah, provide a backwards compatibility config option. As the following poster suggests, PHP needs some way of advancing itself out of the stone age as a programming language. The use of php.ini for register globals sets a precedent to allow this to happen, IMHO. Something like: pgsql_bool_return_string = true for the near future, then change over to pgsql_bool_return_string = false at some later date. My other cohorts on this contract had the exact same idea and to me it seems more than rather plausible to me.


You're probably already aware of this, but you can use a bit(1)
field as a boolean

Most DBMS's don't support BIT column types. Second, some of those that do don't allow NULL in them. NULL is a legit value for a BOOLEAN column.

NULL can be a legit value for any column depending on the DDL. NULL can also be an invalid value for any particular column. I don't see how this makes any difference.


-sc

--
Sean Chittenden

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to