From: Josh Berkus <josh@agliodbs.com>
To: pgsql-sql@postgresql.org
Subject: Manual Trigger Creation
Date: Mon, 19 Mar 2001 14:48:16 -0800
Message-ID: <web-26833@davinci.ethosmedia.com> (raw)
Tom, Stephan. List folks:
I'm having a great deal of trouble with the automated constraint
triggers as implemented in 7.1 beta 3. I find that if I establish a
foriegn key through the CREATE TABLE statement, things start to blow up
if I modify any of the tables involved, and there's no easy way to drop
and re-create the foriegn key. (PostgreSQL isn't alone in this ... MS
SQL Server is a headache if you want to tinker with the relational
structure).
As such, I'd like to manually create my own foriegn key triggers
instead, once I'm done tinkering with the DB structure. Can anyone
provide me with an example of this? I figure I'll need 5 triggers for
each key:
1. ON UPDATE trigger on Reference List
2. ON DELETE trigger on Reference List
3. ON UPDATE trigger on data table
4. ON DELETE trigger on data table
5. ON INSERT trigger on data table
Am I on the right track?
-Josh
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: josh@agliodbs.com
Subject: Re: Manual Trigger Creation
In-Reply-To: <web-26833@davinci.ethosmedia.com>
References: <web-26833@davinci.ethosmedia.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox