pg.ddx.io pljava-dev@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Subject: [Pljava-dev] Aborting a transaction
Date: Sat, 02 Jul 2005 20:47:41 +0200
Message-ID: <thhal-00XmiA+1zzzYL8HSykPfLVQzNmN/lLc@mailblocks.com> (raw)
In-Reply-To: <ce04e69f0507020816199822ca@mail.gmail.com>
References: <ce04e69f0507020816199822ca@mail.gmail.com>
<42C6E14D.20409@mailblocks.com>
<thhal-00XmiA+tzzzYWeLBFQnzYkqNfS6foVG@mailblocks.com>
Joao Afonso wrote:
> Hi,
>
> I want to abort a transaction when a trigger on a table is fired.
>Anyone knows how to do this? Is it something that can be done with
>pl/java or rather at postgresql functions and procedures??
>
> I read on the mailing list about a session manager and/or a
>transaction listener:
> - http://gborg.postgresql.org/pipermail/pljava-dev/2005/000148.html
>
> and about changing the _new resultset value:
> - http://gborg.postgresql.org/pipermail/pljava-dev/2005/000149.html
>
> Basically a trigger is fired before an Insert and calls a function
>that sends some data on a socket about the transaction. what i want to
>do is abort the insert...
>
> Any help?
> Thanks for all your great answers...
>_______________________________________________
>Pljava-dev mailing list
>Pljava-dev at gborg.postgresql.org
>http://gborg.postgresql.org/mailman/listinfo/pljava-dev
>
>
The easiest way to abort is to simply throw an SQLException.
More advanced control can be obtained by using savepoints.
Regards,
Thomas Hallgren
view thread (2+ messages)
Message-ID: <thhal-00XmiA+1zzzYL8HSykPfLVQzNmN/lLc@mailblocks.com> Permalink: ../thhal-00XmiA+1zzzYL8HSykPfLVQzNmN%2FlLc@mailblocks.com/ Also on: postgresql.org/message-id/thhal-00XmiA+1zzzYL8HSykPfLVQzNmN/lLc@mailblocks.com ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients using the --to and --cc options: reply via email To: pljava-dev@postgresql.org Subject: Re: [Pljava-dev] Aborting a transaction In-Reply-To: <thhal-00XmiA+1zzzYL8HSykPfLVQzNmN/lLc@mailblocks.com> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox