Re: complex referential integrity constraints - Mailing list pgsql-general

From Stephan Szabo
Subject Re: complex referential integrity constraints
Date
Msg-id 20070222140632.E61020@megazone.bigpanda.com
Whole thread Raw
In response to Re: complex referential integrity constraints  ("Joris Dobbelsteen" <Joris@familiedobbelsteen.nl>)
List pgsql-general
On Thu, 22 Feb 2007, Joris Dobbelsteen wrote:

> >-----Original Message-----
> >From: pgsql-general-owner@postgresql.org
> >[mailto:pgsql-general-owner@postgresql.org] On Behalf Of
> >Martijn van Oosterhout
> >Sent: donderdag 22 februari 2007 18:17
> >To: Joris Dobbelsteen
> >Cc: Robert Haas; pgsql-general@postgresql.org
> >Subject: Re: [GENERAL] complex referential integrity constraints
> >
> >On Thu, Feb 22, 2007 at 05:28:35PM +0100, Joris Dobbelsteen wrote:
> >> Even worse, I don't you can guarentee that this constraint
> >is enforced
> >> at all times. That means, not if you are using triggers.
> >> The only option seems using foreign keys and put in a lot of
> >redundant
> >> data.
> >
> >Err, foreign keys are implemented using triggers, so this
> >statement is self-contradictary.
>
> Are you really sure they are executed under the same visibility rules?

IIRC, the ri triggers use calls that you aren't able to get at in
triggers written in any of the PLs, but I think you should be able to
replicate the feat in a trigger written in C.

pgsql-general by date:

Previous
From: "Brandon Aiken"
Date:
Subject: Re: postgresql vs mysql
Next
From: Martijn van Oosterhout
Date:
Subject: Re: complex referential integrity constraints