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