can you tell me how to use rollback work in 'pgsql' function? and give me a exsample?

Поиск
Список
Период
Сортировка
От Nee.mem(倪明)
Тема can you tell me how to use rollback work in 'pgsql' function? and give me a exsample?
Дата
Msg-id ATLAS-MAILOc7wo95EF000001bc@atlas-mail.atlas-mail.com
обсуждение исходный текст
Ответы Re: can you tell me how to use rollback work in 'pgsql' function? and give me a exsample?  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-general
i see you wrote on this page 
http://archives.postgresql.org/pgsql-general/2005-07/msg00319.php
  
test exsample:
    create or replace function test()
    returns void as 
    '
    begin 
        delete from regiondata;
        rollback;
    end;
    'language 'plpgsql';
but exception a error:    CONTEXT:  PL/pgSQL function "test" line 3 at SQL statement 
Use others' words :
>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 only for grouping; they do not start or end a transaction
and can you tell me how to use rollback work in 'pgsql' function?  and give me a exsample?

        
 

        alan.nee
        neemem@gmail.com
          2005-07-13

В списке pgsql-general по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Transaction Handling in pl/pgsql?
Следующее
От: Frank Rittinger
Дата:
Сообщение: Re: Windows version of PostgreSQL 8?