On Wed, Oct 19, 2016 at 12:25 PM, Lester Caine <les...@lsces.co.uk> wrote:

> On 18/10/16 23:05, Adam Baratz wrote:
> > Please share your feedback. I'm happy to hear thoughts about the
> pdo_dblib
> > example, but the RFC is more about the possibility of driver-specific
> types
> > than these particular ones.
>
> The whole point of PDO was that anything that was not available across
> ALL drivers would be emulated in some way, or flagged in a way that does
> not break code, so nothing should be added specifically targeting a
> particular driver if it will cause problems when someone selects a
> different driver to run the same application.
>

I'm starting to think I'm looking at the problem in too narrow a way. Other
supported databases have these column types and likely have these issues.
I'm going to read the PDO code some more and look at the ADOdb type
system[1]. It might be there should be common types for binary and unicode
params, and probably also double params. I'm adding doubles, because it
looks like there's an issue where, since really_register_bound_param()
converts doubles to strings, drivers will bind them as strings and not
doubles. Even though, for example, the MySQL driver attempts to distinguish
between strings and doubles.

I'll follow up when I've gathered more information, but this may be in the
form of a separate RFC.

Thanks,
Adam

---
[1] http://adodb.org/dokuwiki/doku.php?id=v5:dictionary:dictiona
ry_index#summary_of_types

Reply via email to