X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DA3F9329E69 for ; Mon, 13 Sep 2004 16:31:00 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 67260-07 for ; Mon, 13 Sep 2004 15:30:56 +0000 (GMT) Received: from fork7.mail.virginia.edu (fork7.mail.Virginia.EDU [128.143.2.177]) by svr1.postgresql.org (Postfix) with ESMTP id 23799329E68 for ; Mon, 13 Sep 2004 16:30:55 +0100 (BST) Received: from localhost (localhost [127.0.0.1]) by fork7.mail.virginia.edu (Postfix) with ESMTP id 2888A1F5167 for ; Mon, 13 Sep 2004 11:30:52 -0400 (EDT) Received: from fork7.mail.virginia.edu ([127.0.0.1]) by localhost (fork7.mail.virginia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 21486-06 for ; Mon, 13 Sep 2004 11:30:52 -0400 (EDT) Received: from virginia.edu (d-137-133-131.bootp.Virginia.EDU [137.54.133.131]) by fork7.mail.virginia.edu (Postfix) with ESMTP id E63CC1F4FE2 for ; Mon, 13 Sep 2004 11:30:51 -0400 (EDT) Message-ID: <4145BD2A.7060502@virginia.edu> Date: Mon, 13 Sep 2004 11:30:50 -0400 From: Jodi Kanter User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Postgres Admin List Subject: dropping a table constraint Content-Type: multipart/alternative; boundary="------------000008030201010607070809" X-UVA-Virus-Scanned: by amavisd-new at fork7.mail.virginia.edu X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.4 tagged_above=0.0 required=5.0 tests=HTML_30_40, HTML_MESSAGE, HTML_TITLE_EMPTY X-Spam-Level: * X-Archive-Number: 200409/111 X-Sequence-Number: 14814 This is a multi-part message in MIME format. --------------000008030201010607070809 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit I needed to add a FK constraint to a table where one was forgotten. I found an add constraint command and used it: ALTER TABLE file_info add foreign key (al_fk) references arraylayout(al_pk); However, I wanted to name the constraint. It now looks like this: $1 FOREIGN KEY (al_fk) REFERENCES arraylayout(al_pk) ON UPDATE NO ACTION ON DELETE NO ACTION I have tried using the drop command so I could recreate it with a name but the drop command is not working. I am on version 7.3.4. can anyone tell me what I am doing wrong? I could dump and restore the entire db but do not want to if it's not necessary. Thanks Jodi -- _______________________________ Jodi L Kanter BioInformatics Database Administrator University of Virginia (434) 924-2846 jkanter@virginia.edu --------------000008030201010607070809 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit I needed to add a FK constraint to a table where one was forgotten. I found an add constraint command and used it:

ALTER TABLE file_info add foreign key (al_fk) references arraylayout(al_pk);

However, I wanted to name the constraint. It now looks like this:

$1 FOREIGN KEY (al_fk) REFERENCES arraylayout(al_pk) ON UPDATE NO ACTION ON DELETE NO ACTION

I have tried using the drop command so I could recreate it with a name but the drop command is not working.
I am on version 7.3.4.

can anyone tell me what I am doing wrong? I could dump and restore the entire db but do not want to if it's not necessary.
Thanks
Jodi

--
_______________________________

_______________________________
Jodi L Kanter
BioInformatics Database Administrator
University of Virginia
(434) 924-2846
jkanter@virginia.edu

 

--------------000008030201010607070809--