On Mon, Mar 07, 2005 at 11:47:32PM -0000, Greg Sabino Mullane wrote: > > > While I don't have any particular objections, doesn't > > Pg (and most other DBMSs supporting savepoints) have > > SQL syntax to implement them ? If so, isn't just > > > > $dbh->do(<savepoint-sql>) > > > > sufficient ? > > Sure, but they also have syntax to implement BEGIN and ROLLBACK. > I see the savepoints as an extension of the same sort of > transaction processing the DBI dos there. Certainly, drivers are > welcome to implementit any way they want (including allowing > savepoints via "do") but the advantages include being able to > track the savepoints closely, even allowing things like returning > an array of the current savepoints to the application. It also > abstracts the savepoint manipulation away from knowing the exact > SQL for your particular DBMS, one of the goals of DBI after all. :)
I'd be interested to see how varied the syntax is between databases. I'd also be interested to see a proposal for an API along with some real-world examples. My position is that I'm open to being persuaded, but you'll have to put in the leg work. The best place for that at this stage is dbi-users as I'd like you to be able to show wider support for the proposals from the user community. Tim.
