Search Postgresql Archives

Re: how to force an insert before Raise Exception?

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

 



On Tue, Apr 19, 2011 at 4:39 PM, giova <giovainstall2@xxxxxxxx> wrote:
> My problem is that i want to do an INSERT into a log table before to raise
> the exception. But RAISE EXCEPTION cancels my Insert.

That's the point of transaction, if it failed the data and any other
changes are rolled back.
You can use dblink (http://www.postgresql.org/docs/current/static/dblink.html),
which will issue a separate connection to database to simulate
autonomous transaction.

Regards,
Taras Kopets

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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