Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 958E6632330 for ; Wed, 10 Feb 2010 08:45:09 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 17006-03 for ; Wed, 10 Feb 2010 12:44:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-fx0-f224.google.com (mail-fx0-f224.google.com [209.85.220.224]) by mail.postgresql.org (Postfix) with ESMTP id 7D165632202 for ; Wed, 10 Feb 2010 08:44:58 -0400 (AST) Received: by fxm24 with SMTP id 24so339762fxm.3 for ; Wed, 10 Feb 2010 04:44:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=GuxwTwAFEs9BBYTDnzaH/UWbNeiPgCuw1n0JISZhw8Q=; b=pSwYxDi1KKSL6Sn/llJwdpMnmQCJ6J0Ni0OrUA+6io+Y5CQU8uTC1tMOrbFXoEB+bG BgA6hixiZcry8mLArPhN7h/HjMeVaGWjQrpPnLVaUAAo6mazrPoM8d3HJeMSjh75Od+5 bBsikHj/nfQJKzJWPMzRBUD/jRG/BmGb7cYVI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=Z3bMq2o81nLqYeWn0GcAAyCy/qsh79UNmYfDAkmjD6k0T8b03pi/gx140XtvSuzXAd kyzrii1cp5yeMZl3UtM3xSXvNnwIa1SjL5ZR7dSJQf2Zmb44OptnUgdRO3sqR4GkebKp 2zuBEIoaHV+7vWCVJdAlYnTUcQ5PDbUpaUqYY= MIME-Version: 1.0 Received: by 10.102.226.14 with SMTP id y14mr135846mug.108.1265805896524; Wed, 10 Feb 2010 04:44:56 -0800 (PST) In-Reply-To: <20100210121142.GE17605@a-kretschmer.de> References: <20100210121142.GE17605@a-kretschmer.de> From: Thom Brown Date: Wed, 10 Feb 2010 12:44:35 +0000 Message-ID: Subject: Re: PHP and PostgreSQL boolean data type To: "A. Kretschmer" Cc: pgsql-general@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201002/433 X-Sequence-Number: 159209 On 10 February 2010 12:11, A. Kretschmer wrote: > In response to Thom Brown : >> Hi, >> >> A long-standing problem we've had with PostgreSQL queries in PHP is >> that the returned data for boolean columns is the string 'f' instead >> of the native boolean value of false. > > http://andreas.scherbaum.la/blog/archives/302-BOOLEAN-datatype-with-PHP-compatible-output.html > Thanks guys. I can see that this is specifically a PHP issue then. It seems like an extreme workaround though. I'd rather see the PHP library updated in a way that would somehow not break existing code which checked for an 'f'. Not quite sure what the solution would be. Thanks Thom