Hi,
I encountered an odd behaviour when I tried to delete a record.
I have two tables "z_base" and "z_ul". z_base's primary key is "isin"
which is referenced by z_ul.
select count(*) from z_base where isin = 'DE000DB3BTR9';
count
-------
1
select count(*) from z_ul where isin = 'DE000DB3BTR9';
count
-------
0
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?
Jan