Re: equivalent of @@TRANCOUNT PostgreSQL

From: MichaelDBA <MichaelDBA(at)sqlexec(dot)com>
To: Thomas Kellerer <shammat(at)gmx(dot)net>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: equivalent of @@TRANCOUNT PostgreSQL
Date: 2021-05-29 22:28:26
Message-ID: fd404a59-fc9b-9465-e1b3-45dc7e5bad00@sqlexec.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

This is sooooo funny how this thread has been progressing.  The purpose
for TRANCOUNT is for applications to track the state of transactions for
a given connection to the database. TRANCOUNT keeps track of open
transactions and is intented for usage in MSSQL server since
transactions  are handled differently there.  In PG we don't have this
"stacked" transactions scenario unit PG 11 where we started to support
procedures that can call other procedures and hence we can have a
stacked list of open transactions.  But still, TRANCOUNT in PG is
basically useless, so when you convert from MS SQL to PG, just throw the
damn thing away!

Regards,
Michael Vitale

Thomas Kellerer wrote on 5/29/2021 2:15 PM:
> mustafa(dot)pekgoz(at)forenda(dot)com(dot)tr schrieb am 29.05.2021 um 15:07:
>> I have a procedure where they have used @@TRANCOUNT , is there an
>> equivalent of @@TRANCOUNT in PostgreSQL? (Except Savepoint)
> The equivalent in Postgres is
>
>    SELECT 1
>
>
>
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Thomas Carroll 2021-05-30 14:04:40 Re: equivalent of @@TRANCOUNT PostgreSQL
Previous Message Thomas Kellerer 2021-05-29 18:15:44 Re: equivalent of @@TRANCOUNT PostgreSQL