Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by mail.postgresql.org (8.11.3/8.11.1) with ESMTP id f2JMmIN90252 for ; Mon, 19 Mar 2001 17:48:18 -0500 (EST) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.4.1) with HTTP id 26833 for ; Mon, 19 Mar 2001 14:48:16 -0800 From: "Josh Berkus" Subject: Manual Trigger Creation To: pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.4.1 Date: Mon, 19 Mar 2001 14:48:16 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200103/373 X-Sequence-Number: 2039 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