Re: Transactions in user defined function

From: Tino Wildenhain <tino(at)wildenhain(dot)de>
To: Jasid ZA <za(dot)jasid(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Transactions in user defined function
Date: 2009-03-13 14:43:53
Message-ID: 49BA7129.9050108@wildenhain.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jasid ZA wrote:
> Hi,
>
> Can we use sql transaction(BEGIN, COMMIT, REVOKE) inside a user defined
> function in Postgresql 8.3?

Would that part of the documentation help?

http://www.postgresql.org/docs/8.3/interactive/plpgsql-structure.html

"Functions and trigger procedures are always executed within a
transaction established by an outer query — they cannot start or commit
that transaction, since there would be no context for them to execute in."

so in short: no.

Regards
Tino

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tino Wildenhain 2009-03-13 14:44:58 Re: Transactions in user defined function
Previous Message Grzegorz Jaśkiewicz 2009-03-13 14:41:49 Re: Transactions in user defined function