| От | erwin@darwine.nl |
|---|---|
| Тема | Re: psql reports back wrong number of affected rows. |
| Дата | |
| Msg-id | 4DF77E94.8050309@darwine.nl обсуждение исходный текст |
| Ответ на | Re: psql reports back wrong number of affected rows. (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-general |
On 6/14/2011 5:05 PM, Tom Lane wrote: > Erwin Moller<erwinmoller@xs4all.nl> writes: >> Then: >> delete from tblissue where issueid=1; >> DELETE 1 >> Postgresql now deletes all rows that had a 1 for parentissueid. (5 in my >> testcase). >> That was correct, and as I intended, but why does Postgres answer >> "DELETE 1" instead of DELETE 6? > It's reporting the number of rows deleted from tblissue. Hi, But I deleted 6 from tblissue in my example. (1 directly, the other 5 by cascade) Hence my confusion. > Cascade > effects are not relevant. > Ok, clear. So the number of deleted rows (DELETE x) are only the ones that directly matched the ones in the where-clause. I suspected that much, but it is better to check. :-) Thanks for your time, Tom Regards, Erwin Moller > regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера