Is it possible to stop the execution of a sql script in case of problem ?
ex :
create table newtable as select * from oldtable
DROP TABLE oldtable
I don't want to drop the table if the first instruction did not work properly
Olivier Chapiteau writes:
> Is it possible to stop the execution of a sql script in case of problem ?
>
> ex :
>
> create table newtable as select * from oldtable
> DROP TABLE oldtable
>
> I don't want to drop the table if the first instruction did not work properly
In psql:
\set ON_ERROR_STOP
--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter
Есть вопросы? Напишите нам!
✖
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера