On Sat, Feb 11, 2006 at 12:56:36PM -0800, David Fetter wrote:
> I'm trying to figure out how to enforce the following.  Table foo has
> a primary key.  Table bar has a foreign key to foo.  So far so good.
> I'd also like to say, "for each row in foo, there must be at least one
> row in bar."

Possibly something involving CREATE CONSTRAINT TRIGGER, specifying
DEFERRABLE INITIALLY DEFERRED?  The documentation says it's not for
general use; I've used it only in simple experiments so I'm not
sure how problematic it could be.  Anybody?

-- 
Michael Fuhr

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to