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 f2JNYVN72431 for ; Mon, 19 Mar 2001 18:34:31 -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 26867; Mon, 19 Mar 2001 15:34:29 -0800 From: "Josh Berkus" Subject: Re: Manual Trigger Creation To: Stephan Szabo Cc: pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.4.1 Date: Mon, 19 Mar 2001 15:34:29 -0800 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200103/375 X-Sequence-Number: 2041 Stephan, > Yeah, it doesn't play nice with alter table at all. :( > Actually, for recreating -- All you really need to do is kill the > three triggers that it creates (drop trigger should work) and use > alter table to add them again. How can I drop them if they are triggers? I've been doing that by editing pg_trigger, but that just got me into a system table mess that it took 2 hours to fix ... and lost me half my foriegn keys to boot. Is there, perhaps, a way I can name my constraints in the original CREATE TABLE statement? Aha! I see ... I never noticed the optional [CONSTRAINT constraint_name] phrase before. 'S what I get for crossing over from Transact-SQL without retraining! > You could do this (4 is unnecessary and 3 and 5 can be combined), > although > I think you might be better off using alter table add constraint to > do > that. I'm interested in the approach for another reason. I have a number of tables that must match a NON-UNIQUE value in a reference table, and thus I'd like to test them against a query or view. -Josh Berkus ______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