Further thoughts on Referential Integrity

From: "Wm(dot) G(dot) Urquhart" <wgu(at)wurquhart(dot)co(dot)uk>
To: PostgreSQL General Forum <pgsql-general(at)postgresql(dot)org>
Subject: Further thoughts on Referential Integrity
Date: 2002-05-20 13:07:01
Message-ID: Pine.LNX.4.44.0205201357520.13618-100000@mailer.wurquhart.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joel Burton 2002-05-20 13:19:48 Re: Further thoughts on Referential Integrity
Previous Message Wm. G. Urquhart 2002-05-20 11:53:24 Referential Integrity.