apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <bo...@rexursive.com>
Subject Re: [PATCH] apr_dbd_oracle.c query/select fixes #37664
Date Sat, 10 Jun 2006 10:18:31 GMT
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. 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).

Personally, I think there is place for both approaches.

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


View raw message