Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13794 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49668 invoked by uid 1010); 8 Nov 2004 18:33:05 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 49605 invoked from network); 8 Nov 2004 18:33:04 -0000 Received: from unknown (HELO mail.trippynames.com) (38.113.223.19) by pb1.pair.com with SMTP; 8 Nov 2004 18:33:04 -0000 Received: from localhost (localhost [127.0.0.1]) by mail.trippynames.com (Postfix) with ESMTP id D7659A6C9A; Mon, 8 Nov 2004 10:33:03 -0800 (PST) Received: from mail.trippynames.com ([127.0.0.1]) by localhost (rand.nxad.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 04951-10; Mon, 8 Nov 2004 10:33:02 -0800 (PST) Received: from [192.168.1.2] (dsl081-069-073.sfo1.dsl.speakeasy.net [64.81.69.73]) by mail.trippynames.com (Postfix) with ESMTP id 314ECA6C96; Mon, 8 Nov 2004 10:33:02 -0800 (PST) In-Reply-To: <20041107220011.GA7261@panix.com> References: <30EB6453-305B-11D9-80C2-000A95C705DC@chittenden.org> <20041107220011.GA7261@panix.com> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-ID: <9C51B9C2-31B4-11D9-8EBB-000A95C705DC@chittenden.org> Content-Transfer-Encoding: 7bit Cc: PHP Internals List Date: Mon, 8 Nov 2004 10:32:57 -0800 To: Daniel Convissor X-Mailer: Apple Mail (2.619) Subject: Re: [PHP-DEV] PostgreSQL driver handles boolean values incorrectly... From: sean@chittenden.org (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 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