Обсуждение: trigger, transactions, eek

Поиск
Список
Период
Сортировка

trigger, transactions, eek

От
Chris Thompson
Дата:
Hi,
I'm trying to find some info on how to safely maintain 2 separate
databases.

Basically, an INSERT or UPDATE will happen the master db, and this should
call a trigger to a cpp app that will exec the appropriate query on the
second db.

I need to be able to check that all is when with both inserts, so would
expect (wrongly probably) to need to use a transaction within a procedure,
and the app that the trigger calls, to also do a transaction of some kind.
This seems, after some browsing, to either be the wrong thing to do, or
prohibited by the fact that the trigger will not be called until after the
transaction
is commited.

If anyone has any pointers on how i should approach this, or whatever, i
would be greatful.

Cheers,
Chris


--

This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the sender. Any
offers or quotation of service are subject to formal specification.
Errors and omissions excepted.  Please note that any views or opinions
presented in this email are solely those of the author and do not
necessarily represent those of edNET or lightershade ltd. Finally, the
recipient should check this email and any attachments for the presence of
viruses.  edNET and lightershade ltd accepts no liability for any damage
caused by any virus transmitted by this email.

--
--
Virus scanned by edNET.

Re: trigger, transactions, eek

От
Manuel Sugawara
Дата:
Chris Thompson <thompson@ednet.co.uk> writes:

> Hi,
> I'm trying to find some info on how to safely maintain 2 separate
> databases.
>
> Basically, an INSERT or UPDATE will happen the master db, and this should
> call a trigger to a cpp app that will exec the appropriate query on the
> second db.

This requires two pass commit which is not implemented in postgres and
will not be implemented in the foreseeable future. May be you should
re think your design or use Oracle :-(

Regards,
Manuel.