Re: Transactions in user defined function - Mailing list pgsql-general

From Tino Wildenhain
Subject Re: Transactions in user defined function
Date
Msg-id 49BA7129.9050108@wildenhain.de
Whole thread Raw
In response to Transactions in user defined function  (Jasid ZA <za.jasid@gmail.com>)
List 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


Attachment

pgsql-general by date:

Previous
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: Transactions in user defined function
Next
From: Tino Wildenhain
Date:
Subject: Re: Transactions in user defined function