Re: [INTERFACES] How to implement referential facilities in PostgreSQL

From: "Jose' Soares" <jose(at)sferacarta(dot)com>
To: "Jackson, DeJuan" <djackson(at)cpsgroup(dot)com>
Cc: leif(at)danmos(dot)dk, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] How to implement referential facilities in PostgreSQL
Date: 1999-01-05 10:33:36
Message-ID: 3691EA80.B0B197B0@sferacarta.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

(see attached file)

I have two tables HEADER and DETAIL linked by an external key

I need to have the following integrity:

1. Don't allow to insert DETAILS if doesn't exist the HEADER with the
same
key.

2. Delete in cascade all DETAILS if one cancel the HEADER having the
same key.

3. UPDATE in cascade the key of all DETAILS if one change the HEADER
key.

-Jose'-

Attachment Content-Type Size
trigger.sql text/plain 2.8 KB

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Wolfgang Stroh 1999-01-05 14:10:26 [Interfaces] extending pg_type
Previous Message Murat Balkas 1999-01-05 09:36:28 using HTML tabular output