Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 6F44B4759D1 for ; Thu, 27 Jun 2002 19:10:22 -0400 (EDT) Mailbox-Line: From Tim.Ellis@gamet.com Thu Jun 27 19:10:22 2002 Received: from linuxmail.lgsinc.com (unknown [12.22.4.163]) by postgresql.org (Postfix) with ESMTP id 11BC04758FE for ; Thu, 27 Jun 2002 19:10:21 -0400 (EDT) Received: from timetop ([10.13.15.254]) by linuxmail.lgsinc.com (8.11.0/8.8.7) with SMTP id g5RN9R120550 for ; Thu, 27 Jun 2002 16:09:27 -0700 Date: Thu, 27 Jun 2002 16:13:32 -0700 From: Tim Ellis To: pgsql-admin@postgresql.org Subject: Constraints/Triggers information? Message-Id: <20020627161332.765f5c04.Tim.Ellis@gamet.com> Organization: Gamet X-Mailer: Sylpheed version 0.7.4 (GTK+ 1.2.10; i586-mandrake-linux-gnu) WerdupHomey: 3.14159265358979323 Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-0.1 required=5.0 tests=SUBJ_ENDS_IN_Q_MARK version=2.30 X-Spam-Level: X-Archive-Number: 200206/221 X-Sequence-Number: 4655 I've got a snipped script like thus: --------------------------------------------------- alter table license drop constraint fk_lic_lc restrict ; drop table license ; create table license ( id numeric(18), . . . ) ; alter table license add constraint fk_lic_lc foreign key (license_code_id) references license_code (id) ; --------------------------------------------------- Where the final statement had previously run successfully: --------------------------------------------------- psql:file.sql:284: NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s) --------------------------------------------------- The initial statement (alter table drop constraint) always fails with --------------------------------------------------- psql:file.sql:22: ERROR: ALTER TABLE / DROP CONSTRAINT: fk_lic_lc does not exist --------------------------------------------------- I can find nothing in psql's "\?" that talks about either triggers or referential integrity constraints. Doing a "\d license" shows me several RI entries like thus: --------------------------------------------------- Triggers: RI_ConstraintTrigger_5602314, RI_ConstraintTrigger_5602320, RI_ConstraintTrigger_5602326 --------------------------------------------------- But I can't get any information on the RI_ entries. What's wrong with me? Do I need to RTFM? If so, which FM do I need to R? -- Tim Ellis DBA, Gamet ps -- doing drop constraint with cascade keyword gives me: --------------------------------------------------- psql:file.sql:22: ERROR: ALTER TABLE / DROP CONSTRAINT does not support the CASCADE keyword ---------------------------------------------------