Search Postgresql Archives

Re: Are rules transaction safe?

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

 



Oliver Fürst <ofuerst@xxxxxxxx> 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


[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