| От | Tom Lane |
|---|---|
| Тема | Re: Violation of non existing reference |
| Дата | |
| Msg-id | 18430.1204824464@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Violation of non existing reference (js@deriva.de) |
| Список | pgsql-general |
js@deriva.de writes:
> So there is no record in z_ul that references z_base with isin
> 'DE000DB3BTR9', but when I do:
> delete from z_base where isin = 'DE000DB3BTR9';
> ERROR: update or delete on table "z_base" violates foreign key
> constraint "z_ul_isin_fkey" on table "z_ul"
> DETAIL: Key (isin)=(DE000DB3BTR9) is still referenced from table
> "z_ul".
> Has anyone an idea how this could happen?
What PG version is this? Are the two columns of identical datatypes?
(I'm wondering about possible funny effects from blank-padding rules,
for example, if one is char and the other is text or varchar.)
You might also try REINDEXing both tables just in case the problem is a
corrupt index.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера