agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
[Pljava-dev] Aborting a transaction
2+ messages / 0 participants
[nested] [flat]

* [Pljava-dev] Aborting a transaction
@ 2005-07-02 15:16  
  0 siblings, 1 reply; 2+ messages in thread

From:  @ 2005-07-02 15:16 UTC (permalink / raw)

  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...




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* [Pljava-dev] Aborting a transaction
@ 2005-07-02 18:47  
  parent: 
  0 siblings, 0 replies; 2+ messages in thread

From:  @ 2005-07-02 18:47 UTC (permalink / raw)

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






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-07-02 18:47 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-07-02 15:16 [Pljava-dev] Aborting a transaction 
2005-07-02 18:47 ` 

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox