Further thoughts on Referential Integrity

Поиск
Список
Период
Сортировка
От Wm. G. Urquhart
Тема Further thoughts on Referential Integrity
Дата
Msg-id Pine.LNX.4.44.0205201357520.13618-100000@mailer.wurquhart.co.uk
обсуждение исходный текст
Ответы Re: Further thoughts on Referential Integrity  ("Joel Burton" <joel@joelburton.com>)
Список pgsql-general
I'm going to show my ignorance of PortgreSQL here since I've only been
using it for a week! But I've been reading the documentation and I've came
across CREATE RULE. I assume from what I understand it would be possible
to implement my DEFAULT 0 using a rule.

I'd need to remove the actual constraint from the table column and then
use an INSERT / UPDATE rule to check to see if the column was 0 then I
ignore it, if it's not; then I check to see if its in the 'referenced'
table.

Would this work or am I asking for trouble?

Your thoughts would be appreciated.

--
Regards,


Wm. G. Urquhart
Custom Software Solutions
http://www.wurquhart.co.uk



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

Предыдущее
От: "Wm. G. Urquhart"
Дата:
Сообщение: Referential Integrity.
Следующее
От: "Joel Burton"
Дата:
Сообщение: Re: Further thoughts on Referential Integrity