Re: Does psql -f quit insertion after an error in a statement has been detected?
В списке pgsql-general по дате отправления:
| От | John R Pierce |
|---|---|
| Тема | Re: Does psql -f quit insertion after an error in a statement has been detected? |
| Дата | |
| Msg-id | 4C0C1A3A.60504@hogranch.com обсуждение исходный текст |
| Ответ на | Does psql -f quit insertion after an error in a statement has been detected? ("Wang, Mary Y" <mary.y.wang@boeing.com>) |
| Список | pgsql-general |
Wang, Mary Y wrote: > Hi, > > I'm using a psql -f command to reload the data from a dump file. I noticed that some tables are not populated with anyrows (I mean 0 rows), yet, if I manually insert a row (actually just copy an INSERT statement from that input file) inthe interactive terminal, that row was added with no problem. So my question "does psql -f quits inserting rows for atable when it detects there is an error in a statement?". The impression that I got is that even though other rows mightnot have any errors, but psql -f seems just quits after it detects an error in a row. > > Am I missing something here? > if the inserts are in a transaction (eg, after a BEGIN), any error will cause the entire transaction to rollback and the rest of the transaction to be 'flushed' until a ROLLBACK or COMMIT statement ends the transaction block.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера