On Saturday 10 June 2006 11:18, Bojan Smojver wrote: > On Sat, 2006-06-10 at 09:58 +0100, Nick Kew wrote: > > Isn't that just the support for different argument formats: %d, %f > > in an argument format string? I thought oracle was setting a precedent > > others could follow in that regard, since the original drivers only > > supported %s but were intended to expand as time&effort permit. > > This is actually the crux of the issue with _prepare and the whole "how > are we going to pass things in and out" issue.
Yep. I'd prefer to stay as close to printf-compatible as we reasonably can. > Some databases, like > PostgreSQL and SQLite, like arguments supplied as string and this is > what PostgreSQL driver explicitly does with %d - gets the string in > p[v]query/select and passes it as an argument to PostgreSQL. Other > databases like native C types for relevant SQL types (e.g. Oracle). Aha. I'd forgotten about that in the pgsql driver (specifically, I'd forgotten we had a %d case). I think I still prefer the proper typed format (oracle-style as was before this change). But I'm willing to be overruled. > Personally, I think there is place for both approaches. Hehe. > It is sometimes advantageous to pass strings in for everything, > especially when the application using APU DBD handles mostly data of > that type. In other apps, callers will have data in native C formats and > passing that is more convenient. However, it's a bit of work to support > both... Indeed. Maybe we could aim to support both, e.g. by setting a property of the apr_dbd_t. -- Nick Kew
