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