agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feed[Pljava-dev] Trigger
4+ messages / 0 participants
[nested] [flat]
* [Pljava-dev] Trigger
@ 2005-01-10 14:38
2005-01-10 16:03 ` [Pljava-dev] Trigger
0 siblings, 1 reply; 4+ messages in thread
From: @ 2005-01-10 14:38 UTC (permalink / raw)
I am using pljava. Created a function Fn() as language java (calling a java
program) and then created a after insert trigger on table for each row which
calls function Fn().
When I start inserting through application not even a single record is
getting inserted. When I remove the trigger it starts inserting into the
table. Any thought on this
Thx
rao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20050110/f15544f5/attachment.html;
^ permalink raw reply [nested|flat] 4+ messages in thread
* [Pljava-dev] Trigger
2005-01-10 14:38 [Pljava-dev] Trigger
@ 2005-01-10 16:03 `
0 siblings, 0 replies; 4+ messages in thread
From: @ 2005-01-10 16:03 UTC (permalink / raw)
Nageshwar,
> When I start inserting through application not even a single record is
> getting inserted. When I remove the trigger it starts inserting into
> the table. Any thought on this
>
And you don't get any error messages or exceptions?
Regards,
Thomas Hallgren
^ permalink raw reply [nested|flat] 4+ messages in thread
* [Pljava-dev] Trigger
@ 2005-01-11 06:36
2005-01-11 07:15 ` [Pljava-dev] Trigger
0 siblings, 1 reply; 4+ messages in thread
From: @ 2005-01-11 06:36 UTC (permalink / raw)
Hi,
Now I am having a basic doubt. The trigger is after insert trigger for each
row. When the calling function fails, there is no record inserted in the
table. Does this mean that it is rolled back when the trigger function
fails?
Thx
rao
-----Original Message-----
From: Thomas Hallgren [mailto:thhal at mailblocks.com]
Sent: Monday, January 10, 2005 9:34 PM
To: Nageshwar Rao
Cc: 'pljava-dev at gborg.postgresql.org'
Subject: Re: [Pljava-dev] Trigger
Nageshwar,
> When I start inserting through application not even a single record is
> getting inserted. When I remove the trigger it starts inserting into
> the table. Any thought on this
>
And you don't get any error messages or exceptions?
Regards,
Thomas Hallgren
^ permalink raw reply [nested|flat] 4+ messages in thread
* [Pljava-dev] Trigger
2005-01-11 06:36 [Pljava-dev] Trigger
@ 2005-01-11 07:15 `
0 siblings, 0 replies; 4+ messages in thread
From: @ 2005-01-11 07:15 UTC (permalink / raw)
Nageshwar Rao wrote:
>Hi,
>Now I am having a basic doubt. The trigger is after insert trigger for each
>row. When the calling function fails, there is no record inserted in the
>table. Does this mean that it is rolled back when the trigger function
>fails?
>
>
Using PosgreSQL versions prior to 8.0 the answer would be yes. The
transaction is always completely rolled back when an error occurs. In
8.0, savepoints are introduced. They give you a chance to cope with
errors and roll back partially. A trigger can set a savepoint internally
and roll back to that point if it fails and then continue the transaction.
Regards,
Thomas Hallgren
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2005-01-11 07:15 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-01-10 14:38 [Pljava-dev] Trigger
2005-01-10 16:03 `
2005-01-11 06:36 [Pljava-dev] Trigger
2005-01-11 07:15 `
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox