Re: @@TRANCOUNT ?

From: Justin <zzzzz(dot)graf(at)gmail(dot)com>
To: İlyas Derse <ilyasderse(at)gmail(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: @@TRANCOUNT ?
Date: 2020-01-22 14:23:10
Message-ID: CALL-XeP8=rniSsmNAC7jLF26MRM2j9oKBvgJxwkPcKeS90JWfQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)gmail(dot)com> wrote:

> What's Prostgres' equivalent of select @@trancount
> <https://msdn.microsoft.com/en-us/library/ms187967.aspx>? Do you have an
> idea ?
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2020-01-22 15:34:17 Re: SQL Query Syntax help
Previous Message Rob Sargent 2020-01-22 14:01:54 Re: @@TRANCOUNT ?