Re: PDO types
| From: | Wez Furlong | Date: | Sun, 20 Feb 2005 09:26:53 +0000 |
| Subject: | Re: PDO types | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-15113@lists.php.net to get a copy of this message | ||
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 <thekid@thekid.de> 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
>
>