sql: name an SQL transaction
Sometimes it is valuable to have a name attached to a SQL transaction that can aid in debugging. For instance adding the originating client file:line:func from where the transaction has originated can be super useful.
One option is to allow BEGIN/START to have an optional name.
Sounds reasonable. The grammar mostly has support for this. You can do BEGIN TRANSACTION ISOLATION LEVEL foo and SET TRANSACTION ISOLATION LEVEL bar. Extending that to allow setting of a name (e.g. BEGIN TRANSACTION NAME=foo) should be straightforward.
I'm going to tag this 1.0. FWIW, at Square it was found that the location of the BEGIN call wasn't as important as the line number of individual statements, so the ORM (ActiveRecord) was patched to include a SQL comment at the end of each statement that contained the file name and line number. See also https://github.com/basecamp/marginalia
This doesn't seem particularly important to me. ORMs can't leverage features like this, because they require custom syntax. Most ORMs I've seen deal with this problem by adding a comment to the statement that they're sending.
We're definitely not getting this done in 2.0 regardless.
I don't think this is super valuable to keep open. Not going to happen soon. If we identify a real need we can reopen this later.