Constraint, Rule, or Trigger?

From: Randall Perry <rgp(at)systame(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Constraint, Rule, or Trigger?
Date: 2001-08-11 02:38:40
Message-ID: B79A12F0.E43D%rgp@systame.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I've had experience with SQL and database design, but not much with rules &
triggers. What's the best method to accomplish the following it PGSQL:

_Table A_ has a boolean field 'status'

_Table B_ has a 1-1 child relationship to Table A.

The rule, trigger, or contraint would have to enforce that: no record could
be created in B if the 'status' field was false in the parent record in A

Just point me in the right direction.
Thanks

--
Randy Perry
sysTame
Mac Consulting/Sales

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joe Conway 2001-08-11 02:53:47 Re: Constraint, Rule, or Trigger?
Previous Message Allan Engelhardt 2001-08-10 22:52:10 How to change default time display format (and buglet?)?