Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: expected trigger behavior in transactions


  • From: Dave Cramer <pg(at)fastcrypt(dot)com>
  • To: Noah Davis <noah(at)acadaca(dot)com>
  • Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
  • Subject: Re: expected trigger behavior in transactions
  • Date: Mon, 30 Aug 2004 13:29:07 -0400
  • Message-id: <1093886947.1556.44.camel@localhost.localdomain> <text/plain>

Noah,

Can you please post in plain text?

I'd suggest looking at the postgresql logs to see what is really going
on.

There are no "special" contexts.

Dave
On Mon, 2004-08-30 at 13:01, Noah Davis wrote:
> Hi, 
>  
> Forgive me if this isn't directly a JDBC issue.
>  
> I have some triggers setup in postgres that are triggered before
> inserts. They are pretty basic triggers. They update some columns and
> then continue on with the insert. 
>  
> We have some java code which starts a transaction (sets auto commit to
> false) and then performs some inserts. If successful, it commits the
> transaction. Sometimes, it appears like the trigger is fired but does
> not commit. Is there a separate connection context for triggers? Do I
> have to worry about how triggers work within a transaction? If I
> commit/rollback an insert, does it commit/rollback the triggers which
> were fired?
>  
> It seems like when I do the steps directly in postgres, the triggers
> are fired appropriately if in a transaction. However, within Java, in
> some cases the triggers either aren't fired, or are fired, but do not
> commit when jdbc commits. Any ideas what's going on here?
>  
> Thanks for any help,
>  
> Noah
> ______________________________________________
> Noah Davis
> 636 Broadway, Suite 516
> New York, New York 10012
> p: 212.505.5885
> f: 212.505.5655
> noah(at)acadaca(dot)com
> www.acadaca.com
>  
-- 
Dave Cramer
519 939 0336
ICQ # 14675561
www.postgresintl.com




Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group