[GENERAL] creating a trigger to access another postgres database?

2008-03-28 Thread carty mc
I have a question regarding postgres Trigger. We have two applications which connect to two different databases (Both are postgres). Is it possible to create a trigger (row based) in one database say A, which can access another database say B and updates a table there. In brief, Is it

[GENERAL] Database trigger across multiple postgres databases

2008-03-28 Thread carty mc
I have a question regarding postgres Trigger. We have two applications which connect to two different databases (Both are postgres). Is it possible to create a trigger (row based) in one database say A, which can access another database say B and updates a table there. In brief, Is it

Re: [GENERAL] creating a trigger to access another postgres database?

2008-03-28 Thread carty mc
an error some Rule need to be set. Whereas If I hardcode that value instead of using NEW. it is working fine? I appreciate any insights, thanks, Richard Huxton <[EMAIL PROTECTED]> wrote: carty mc wrote: > I have a question regarding postgres Trigger. We

Re: [GENERAL] creating a trigger to access another postgres database?

2008-03-29 Thread carty mc
Thank you very much Richard. It worked like a charm. I Appreciate your help Richard Huxton <[EMAIL PROTECTED]> wrote: carty mc wrote: > Thanks Richard, I went through dblink and tried it . But I am not > able to pass variables to sql stmt of dblink_exec function . >

[GENERAL] dblink ,dblink_exec not participating in a Transaction??

2008-04-01 Thread carty mc
How I can make dblink to participate in transaction so that remote changes made by dblink can only be committed if only local transaction succeds. Here is my current scenario: I am using two databases A & B. In Database A, I have trigger procedure written for a Table . In this trigg

Re: [GENERAL] dblink ,dblink_exec not participating in a Transaction??

2008-04-01 Thread carty mc
determine whether to commit or rollback. It is the main transaction manager. In this case the updates that were made using dblink_exec are not getting rolled back in Database B. carty mc <[EMAIL PROTECTED]> wrote: How I can make dblink to participate in transaction s

Re: [GENERAL] dblink ,dblink_exec not participating in a Transaction??

2008-04-02 Thread carty mc
primary transaction of the function. select fn_test(false); select * from log; --you see a new row select fn_test(true) --ERROR: division by zero select * from log; --you see that a new row wasn't inserted. Jon - F

Re: [GENERAL] dblink ,dblink_exec not participating in a Transaction??

2008-04-02 Thread carty mc
Jon, Thanks for the reply. As i explained earlier, I am using java (via hibernate) to control the overall transaction. I cannot have begin/rollback statements for dblink_exec. Only when the entire method call from java succeeds I want the transaction to be commited. I dont want a