| От | William Garrison |
|---|---|
| Тема | How to test something using ROLLBACK TRANSACTION |
| Дата | |
| Msg-id | 48C0342E.4080906@mobydisk.com обсуждение исходный текст |
| Ответы |
Re: How to test something using ROLLBACK TRANSACTION
|
| Список | pgsql-general |
Coming from MS SQL server, if I ever change anything vital on a
production system, or do any kind of major hackery on my own, I wrap it
in a transaction first:
BEGIN TRANSACTION;
DELETE FROM vital_information WHERE primary_key = 10;
ROLLBACK TRANSACTION;
I then make sure that the result comes back and says
1 row(s) modified
or something equally reassuring. I have horror stories where DBAs
fat-fingered something and deleted data. But when I do this in
pgadmin3, I get a dissatisfying result:
Query returned successfully with no result in 15 ms.
This response isn't wrong really... but it is not what I was hoping
for. Any way to get the result of the commands that were inside the
transaction?
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера