Resolving of reference/foreign keys

Поиск
Список
Период
Сортировка
От Oliver Friedrich
Тема Resolving of reference/foreign keys
Дата
Msg-id BCEFLCEOHFPNLLAKKGAAOEFGCKAA.oliver@familie-friedrich.de
обсуждение исходный текст
Ответы Re: Resolving of reference/foreign keys  (Thomas O'Dowd <tom@nooper.com>)
Список pgsql-jdbc
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


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Nick Fankhauser"
Дата:
Сообщение: Re: HEEEELPPPPPPPPP!!!!!!!!!!!!
Следующее
От: Thomas Haeberlen
Дата:
Сообщение: Suggestion for an improvement... ("database" part missing in URI)