Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13773 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62054 invoked by uid 1010); 7 Nov 2004 22:00:12 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 61919 invoked from network); 7 Nov 2004 22:00:12 -0000 Received: from unknown (HELO mail3.panix.com) (166.84.1.74) by pb1.pair.com with SMTP; 7 Nov 2004 22:00:12 -0000 Received: from panix5.panix.com (panix5.panix.com [166.84.1.5]) by mail3.panix.com (Postfix) with ESMTP id 997E09825D for ; Sun, 7 Nov 2004 17:00:11 -0500 (EST) Received: (from analysis@localhost) by panix5.panix.com (8.11.6p3/8.8.8/PanixN1.1) id iA7M0B615989 for internals@lists.php.net; Sun, 7 Nov 2004 17:00:11 -0500 (EST) Date: Sun, 7 Nov 2004 17:00:11 -0500 To: PHP Internals List Message-ID: <20041107220011.GA7261@panix.com> References: <30EB6453-305B-11D9-80C2-000A95C705DC@chittenden.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Subject: Re: [PHP-DEV] PostgreSQL driver handles boolean values incorrectly... From: danielc@analysisandsolutions.com (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 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. Stuff like this will likely be handled by the experimental PDO extension. When it becomes stable and fully develloped, things will be very nice. > 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. I'll be talking about compatibility issues like this at the International PHP Conference this coming Wednesday at 13:30 during my talk entitled "Building Truly Portable Database Applications in PHP." I'll have the slides up later this week. --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409