<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forum PostgreSQL - Funkcja i transakcje]]></title>
	<link rel="self" href="http://forum.postgresql.org.pl/extern.php?action=feed&amp;tid=1324&amp;type=atom"/>
	<updated>2012-04-05T05:25:34Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.postgresql.org.pl/viewtopic.php?id=1324</id>
		<entry>
			<title type="html"><![CDATA[Odp: Funkcja i transakcje]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=3585#p3585"/>
			<content type="html"><![CDATA[Jeżeli się nie mylę to funkcja jest  transakcją, więc powinna wycofać zmiany przy błędzie. Jest jeszcze savepoint 
[url]http://www.postgresql.org/docs/8.2/static/sql-savepoint.html[/url]
ale nie wiem czy używa się w funkcji. Może ktoś lepiej zorientowany się wypowie.
[url]http://forum.4programmers.net/Bazy_danych/187078-transakcje_w_funkcji[/url]
[url]http://grokbase.com/t/postgresql/pgsql-general/105qt2006r/rollback-in-a-function[/url]]]></content>
			<author>
				<name><![CDATA[adamleon]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=873</uri>
			</author>
			<updated>2012-04-05T05:25:34Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=3585#p3585</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Funkcja i transakcje]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=3584#p3584"/>
			<content type="html"><![CDATA[Witam,
mam pytanie mam funkcję która w kursorze wstawia dane do tabli i chce jak pojawi się błąd wycofać te inserty. Czyli

begin -- początek funkcji
   open kursor;

"tutaj są inserty do tabel"

   close kursor;

return (0);
exception


when others then
    raise notice 'Pojawił się inny błąd!';
    raise notice '% %', SQLERRM, SQLSTATE;

    return('Błąd!');
end;  -- koniec funkcji

Jak do takiej funkcji wstawić rollback?]]></content>
			<author>
				<name><![CDATA[Rafik83]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=1332</uri>
			</author>
			<updated>2012-04-04T11:01:38Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=3584#p3584</id>
		</entry>
</feed>
