Re: Are rules transaction safe?

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: Are rules transaction safe?
Дата
Msg-id 87mzhhcrmi.fsf@asmodeus.mcnaught.org
обсуждение исходный текст
Ответ на Are rules transaction safe?  (Oliver Fürst <ofuerst@tsak.net>)
Ответы Re: Are rules transaction safe?  (Oliver Fürst <ofuerst@tsak.net>)
Список pgsql-general
Oliver Fürst <ofuerst@tsak.net> writes:

> Hi all,
>
> I have a question regarding rules on views. Are the commands inside a
> ON INSERT (or UPDATE) DO INSTEAD (implicit) transactions for postgres?
> I tried to put BEGIN; and COMMIT; around the commands in a ON ... DO
> INSTEAD ( ) block, but keep getting a syntax error.

Everything that happens in Postgres is inside either an implicit or
explicit transaction, so you can't do BEGIN/COMMIT inside rules or
functions.

You might be able to use savepoints, depending on what you're actually
trying to do.

-Doug

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

Предыдущее
От: Oliver Fürst
Дата:
Сообщение: Are rules transaction safe?
Следующее
От: Dave E Martin
Дата:
Сообщение: parameter substitution problem in jdbc driver? (8.1)