Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15113 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88828 invoked by uid 1010); 20 Feb 2005 10:00:51 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 37849 invoked from network); 20 Feb 2005 09:26:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Feb 2005 09:26:56 -0000 X-Host-Fingerprint: 64.233.184.192 wproxy.gmail.com Linux 2.4/2.6 Received: from ([64.233.184.192:21540] helo=wproxy.gmail.com) by pb1.pair.com (ecelerity 1.2 (r4437)) with SMTP id 79/69-06388-0E758124 for ; Sun, 20 Feb 2005 04:26:56 -0500 Received: by wproxy.gmail.com with SMTP id 63so286673wri for ; Sun, 20 Feb 2005 01:26:53 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=UK088huE3L7na7aKUfFwMiXpsihLv1p304fkPsdnW2kQwkheZu0KYytRNvWRU/+aNtUGKqA5T9sQ7OTxqVkjcsH4En956vdJNJb3Lg5e2q08Mr4v3TQhwUCr2rxxBvmG6fmmeBWUTGP0c0BiUAGGK8rPSuyCLIoSGTuxWu1kS2I= Received: by 10.54.17.23 with SMTP id 23mr88905wrq; Sun, 20 Feb 2005 01:26:53 -0800 (PST) Received: by 10.54.59.22 with HTTP; Sun, 20 Feb 2005 01:26:53 -0800 (PST) Message-ID: <4e89b426050220012671a3f3af@mail.gmail.com> Date: Sun, 20 Feb 2005 04:26:53 -0500 Reply-To: Wez Furlong To: Timm Friebe Cc: internals@lists.php.net In-Reply-To: <1108836903.316.40.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <1108836903.316.40.camel@localhost> Subject: Re: [PHP-DEV] PDO types From: kingwez@gmail.com (Wez Furlong) This is by design. PDO is deliberately very thin on type support, prefering to give the script author more control over type conversion by using the PHP built-in type juggling features. PgSQL returns other types because it is one of 2 drivers that gives you what it's got, rather than what you ask for. I didn't originally plan for those two to work that way, it just works out to be more efficient and less painful for those drivers to do it that. PDO's goal isn't total unification, but "close-enough unification". If you want something all-encompassing, you should consider a heavier-weight abstraction layer, like MDB2. --Wez. On Sat, 19 Feb 2005 19:15:03 +0100, Timm Friebe wrote: > Hi, > > while testing PDO I was astonished to see that all values (regardless of > their types in the database) are returned as strings (in all extensions > except for PgSQL). Why is that so? It _is_ quite inconsistent, isn't it? > Wasn't PDO supposed to _unify_ the RDBMS access apis? > > -- > Timm > If it ain't broken, it doesn't have enough features yet > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >