Search Postgresql Archives

Re: Transaction Handling in pl/pgsql?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>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
> 

Unless you are using savepoints in 8.x, any error you generate will
automatically cause the need to rollback.

If you are using savepoints you can rollback to a specific point of
a parent transaction.



Sincerely,

Joshua D. Drake


> 
> 
> 
> How to use rollback  work in pl/pgsql functions.? Give an example 
> 
> 
> ---------------------------(end of broadcast)---------------------------TIP 5: don't forget to increase your free space map settings


-- 
Your PostgreSQL solutions provider, Command Prompt, Inc.
24x7 support - 1.800.492.2240, programming, and consulting
Home of PostgreSQL Replicator, plPHP, plPerlNG and pgPHPToolkit
http://www.commandprompt.com / http://www.postgresql.org

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux