Re: [PHP-DEV] PostgreSQL driver handles boolean values incorrectly...

2004-11-08 Thread Daniel Convissor
Hi Sean: On Mon, Nov 08, 2004 at 10:32:57AM -0800, Sean Chittenden wrote: > > Bah, provide a backwards compatibility config option. The PHP extension isn't a place for that. PDO or some database abstraction layer written in PHP is. Anyway, as mentioned, none of the DBMS's output a boolean dat

Re: [PHP-DEV] PostgreSQL driver handles boolean values incorrectly...

2004-11-08 Thread Sean Chittenden
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

Re: [PHP-DEV] PostgreSQL driver handles boolean values incorrectly...

2004-11-07 Thread Daniel Convissor
On Sun, Nov 07, 2004 at 12:38:06PM -0600, Michael Sims wrote: > Sean Chittenden wrote: > > 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 h

Re: [PHP-DEV] PostgreSQL driver handles boolean values incorrectly...

2004-11-07 Thread Thomas Seifert
On Sun, 07 Nov 2004 11:59:09 -0800, Sean Chittenden wrote: >>> *nods* It's a pretty evil behavior, IMHO. It's all too common to >>> have >> >> It has been like that for ages as far as I know and plenty of code >> relies on it, so it can't be changed really. > > Better late than never. I've g

Re: [PHP-DEV] PostgreSQL driver handles boolean values incorrectly...

2004-11-07 Thread Sean Chittenden
*nods* It's a pretty evil behavior, IMHO. It's all too common to have It has been like that for ages as far as I know and plenty of code relies on it, so it can't be changed really. Better late than never. I've got a ton of code depending on it too, but believe me when I say doing: find . -t

Re: [PHP-DEV] PostgreSQL driver handles boolean values incorrectly...

2004-11-07 Thread Christian Schneider
Sean Chittenden wrote: *nods* It's a pretty evil behavior, IMHO. It's all too common to have It has been like that for ages as far as I know and plenty of code relies on it, so it can't be changed really. 100K lines of web goo. *sighs* Moved a large database schema from INTs to BOOLs, and u

Re: [PHP-DEV] PostgreSQL driver handles boolean values incorrectly...

2004-11-07 Thread Sean Chittenden
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: [...] You're probably already aware of this, but you can use a bit(1) field as a boolean and this will map to PHP values tha

RE: [PHP-DEV] PostgreSQL driver handles boolean values incorrectly...

2004-11-07 Thread Michael Sims
Sean Chittenden wrote: > 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: [...] You're probably already aware of this, but you can use a bit(1) field as a boolean and th