4 ms·
Yes it did. The "embedded transactions" is the new feature.
by gmfawcett 8y ago
Yes it did. The "embedded transactions" is the new feature.
- j16sdiz 8y agoNo, it didn't. It had functions, not procedure. You can emulate (most of) procedure using function that return void. See also https://blog.2ndquadrant.com/postgresql-11-server-side-procedures-part-1/ https://blog.2ndquadrant.com/postgresql-11-server-side-proce...
- riku_iki 8y ago> most of Curious, what are those procedures which can't be emulated as functions. Maybe you have a chance to describe some example?
- cryptonector 8y agoThere is only one thing that procedures can do that functions can't: nest transactions inside the transaction that calls it.
- gmfawcett 8y agoYes, that's true, although slightly pedantic. I'm sure there are procedural cases that PG functions can't emulate, although I don't think I've ever encountered one in practice. Having said that, the addition of transaction support is a great step forward.
- cryptonector 8y agoOnly one: the ability to BEGIN/ROLLBACK/COMMIT in the body of the function.
- saltcured 8y agoAnd, this is just adding new syntactic support for SQL standards compliance, right? I don't think it's really a new control-flow if you ignore syntactic differences. I think you can get the equivalent behavior out of BEGIN/EXCEPT blocks in plpgsql functions. I think this behaves as if you used SAVEPOINT and ROLLBACK TO SAVEPOINT which have been directly supported in postgresql but not in functions.