Joshua D. Drake wrote:
If you are using savepoints you can rollback to a specific point of
a parent transaction.
Although you can't use savepoints (explicitly) in functions. PL/PgSQL
exceptions (which are actually implemented internally via savepoints)
can be used to achieve a similar effect.
>>your_function adds some rows but the last one gives an error, because
>>all statements that are out of a transaction block are in its own
>>transaction the select calling your_function is inside a
>>transaction... so, the answer is yes... the statements inside the
>>function will be rolled back
pgsql-general,
On 7/12/05, Craig Bryden
wrote:
> Hi
>
> I am trying to get a better understanding of how transactions work in
> pl/pgsql functions. I found the following text in the help:
> "It is important not to confuse the use of BEGIN/END for grouping statements
> in PL/pgSQL wi
Thanks a stack. That has answered by question.
Craig
- Original Message -
From: "Douglas McNaught" <[EMAIL PROTECTED]>
To: "Craig Bryden" <[EMAIL PROTECTED]>
Cc: "pgsql"
Sent: Tuesday, July 12, 2005 8:46 PM
Subject: Re: [GENERAL] Transact
"Craig Bryden" <[EMAIL PROTECTED]> writes:
> OK. I have read that. The part that sticks out is "A block containing an
> EXCEPTION clause is significantly more expensive to enter and exit than a
> block without one. Therefore, don't use EXCEPTION without need. ".
> Performance is paramount to me.
>
> I am trying to get a better understanding of how transactions work in
> pl/pgsql functions. I found the following text in the help:
> "It is important not to confuse the use of BEGIN/END for grouping statements
> in PL/pgSQL with the database commands for transaction control. PL/pgSQL's
> BEGIN/E
2005 7:37 PM
Subject: Re: [GENERAL] Transaction Handling in pl/pgsql
On 7/12/05, Craig Bryden <[EMAIL PROTECTED]> wrote:
> Hi
>
> I am trying to get a better understanding of how transactions work in
> pl/pgsql functions. I found the following text in the help:
> "It is i
se will all the statements still be rolled back
if an error occurs?
Thanks
Craig
- Original Message -
From: "Douglas McNaught" <[EMAIL PROTECTED]>
To: "Craig Bryden" <[EMAIL PROTECTED]>
Cc: "pgsql"
Sent: Tuesday, July 12, 2005 7:43 PM
Subject: Re: [GE
"Craig Bryden" <[EMAIL PROTECTED]> writes:
> I am trying to get a better understanding of how transactions work in
> pl/pgsql functions. I found the following text in the help:
> "It is important not to confuse the use of BEGIN/END for grouping statements
> in PL/pgSQL with the database commands f
On 7/12/05, Craig Bryden <[EMAIL PROTECTED]> wrote:
> Hi
>
> I am trying to get a better understanding of how transactions work in
> pl/pgsql functions. I found the following text in the help:
> "It is important not to confuse the use of BEGIN/END for grouping statements
> in PL/pgSQL with the dat
Hi
I am trying to get a better understanding of how transactions work in
pl/pgsql functions. I found the following text in the help:
"It is important not to confuse the use of BEGIN/END for grouping statements
in PL/pgSQL with the database commands for transaction control. PL/pgSQL's
BEGIN/END are
11 matches
Mail list logo