@@TRANCOUNT ?
What's Prostgres' equivalent of select @@trancount
<https://msdn.microsoft.com/en-us/library/ms187967.aspx>? Do you have an
idea ?
1 ;)
Show quoted text
On Jan 22, 2020, at 5:59 AM, İlyas Derse <ilyasderse@gmail.com> wrote:
What's Prostgres' equivalent of select @@trancount? Do you have an idea ?
Postgresql does not support Transaction in the same way mssql, it does
support nesting transactions in a limited way from version 11+
https://docs.microsoft.com/en-us/sql/t-sql/functions/trancount-transact-sql?view=sql-server-ver15
https://www.postgresql.org/docs/current/sql-begin.html
https://wiki.postgresql.org/wiki/Autonomous_subtransactions
https://www.postgresql.org/docs/11/sql-createprocedure.html
https://severalnines.com/database-blog/overview-new-stored-procedures-postgresql-11
From version 11 and up we have Procedures it supports commit and rollback
transaction inside a PROCEDURE and must be called with CALL, there are no
savepoints or transaction naming support...
There are work around this problem using PlPython, or FDW to callback to
postgresql creating a new session to create independent Transactions..
On Wed, Jan 22, 2020 at 7:59 AM İlyas Derse <ilyasderse@gmail.com> wrote:
Show quoted text
What's Prostgres' equivalent of select @@trancount
<https://msdn.microsoft.com/en-us/library/ms187967.aspx>? Do you have an
idea ?