By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,332 Members | 1,198 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,332 IT Pros & Developers. It's quick & easy.

dblink: rollback transaction

P: n/a
Is there a way to rollback a dblink transaction?
Say, I delete some data from the remote database, but I don't want this
to be visible untill the data is inserted in the current database. And
if the insertion of data in the current database throws an error, I want
to rollback the dblink transaction, which should restore data in its
original remote location.

Thanks.

Oleg

*************************************
This e-mail may contain privileged or confidential material intended for the named recipient only.
If you are not the named recipient, delete this message and all attachments..
Unauthorized reviewing, copying, printing, disclosing, or otherwise using information in this e-mail is prohibited.
We reserve the right to monitor e-mail sent through our network.
*************************************

Nov 22 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Oleg Lebedev said:
Is there a way to rollback a dblink transaction?
Say, I delete some data from the remote database, but I don't want this
to be visible untill the data is inserted in the current database. And
if the insertion of data in the current database throws an error, I want
to rollback the dblink transaction, which should restore data in its
original remote location.


What about doing the insert first, and then issuing the delete via the
dblink? If the insert fails and the transaction rolls back then the
deletion in the remote database will never have been done.

John Sidney-Woollett

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.