Hi,
PostgreSQL supports foreign/reference keys. Is it possible to check with
this references for existing entries that need an entry before delete it? A
example:
Table A has a field 'ID' and an field 'text', the table B has its own field
'ID', the field 'table_A_ID' and field 'name'. The field 'table_A_ID'
references to the field 'ID' of table A. Now i want to delete an entray in
table A, but only if there is no entry in table B that requiers this entry.
One solution would be, if i make a SELECT on table B with the ID of table A,
but if there are more than one referenced fields this would be ineffective.
So i want to send a query to table A, that resolves all reference or just
counts the amount of references. Is that possible?
Thanks,
Oliver