sequelize/sequelize — pull request #1780 by fixe (2014-05-18 17:51:29+00:00)
Title: Add savepoint support for postgres transactions

This PR allows the developer to use nested transactions by levering PostgreSQL `SAVEPOINT` feature.

Example using generators:

```javascript
sequelize.transaction(function(t1) {
// `START TRANSACTION` was emitted.

sequelize.transaction({ transaction: t1 }, function(t2) {
// `SAVEPOINT ` was emitted.

t2.rollback();

// `ROLLBACK TO SAVEPOINT ` was emitted.
});
})
```