Greg Sabino Mullane wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
The first release candidate for the new version of DBD::Pg is
now available for testing. This is a very major change from the
current version (1.49), so if you are using DBD::Pg, it is highly
recommended you test it out early and thoroughly, so we can iron
out any problems before the final release.
Among the major changes are:
* Full support for arrays: Perl arrays are transformed to Postgres
arrays automatically, and vice-versa.
I presume this is "array type stored in a column", not "array for bulk loading"
?
Does Pg support native array binding of tuples yet ? The docs could be
a bit confusing. E.g., I'm not certain what "Supported by this driver as proposed by
DBI."
means ? You may want to clarify that bit, and the difference
between "bind array to a column" vs. "binding an array of parameters")
Esp., does the COPY IN support native array binding (not the DBI default
iterator) ?
* Asynchronous queries, which let's you start a query, go off and do
other things, and check back to see if it has finished, and fetch the
data when you are ready to. This also allows you to cancel running queries.
Groovy! I'll have to give this a go w/ DBIx::Threaded's async
wrappers.
BTW: Do you have any examples that are "smarter" about
testing ready() ? I.e., grab the Pg socket, do a select() or poll(),
and only call ready() when there's activity on the socket ?
I've implemented a driver-specific function in DBD::Teradata to
do that internally (essentially, a select() for $dbh's + other filehandles).
Might be something to consider for Pg (I'd suggest support
at the DBI layer, except some drivers (e.g., ODBC) may not have access
to the underlying communication channel.
Great work!
Dean Arnold
Presicient Corp.