Mike Rylander <mrylan...@gmail.com> was heard to say:

> I think I'd add three calls to the proposed API, though, for support
> of savepoints.  They're part of the SQL standard, and supported by
> several SQL RDBMS' including Postgres (the db my project uses, and we
> use libdbi to connect to PG).  The relevant PG documentation is
> available at http://www.postgresql.org/docs/9.1/static/sql-savepoint.html
> .  I have wrappers for savepoints in my implementation, and they are
> very handy for complex DB interactions.

Sounds like a no-brainer if it is as simple as you say. I don't keep  
the SQL standard underneath my pillow, but is it safe to assume that  
database engines are responsible to deal with any pending savepoints  
if a transaction is committed (i.e. no extra work for libdbi)?

This brings up another question. Applications should of course check  
the "transaction_supported" and "savepoints_supported" driver  
capabilities and act responsibly. But if a database engine does not  
support savepoints, or transactions altogether, should libdbi just go  
ahead when asked, or should it throw an error instead? I recall that  
MySQL "supported" transactions in MyISAM tables using no-ops.


Markus Hoenicka
AQ score 38

Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
libdbi-users mailing list

Reply via email to