From: Jodi Kanter <jkanter@virginia.edu>
To: Postgres Admin List <pgsql-admin@postgresql.org>
Subject: dropping a table constraint
Date: Mon, 13 Sep 2004 11:30:50 -0400
Message-ID: <4145BD2A.7060502@virginia.edu> (raw)
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 <mailto:jkanter@virginia.edu100>
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-admin@postgresql.org
Cc: jkanter@virginia.edu
Subject: Re: dropping a table constraint
In-Reply-To: <4145BD2A.7060502@virginia.edu>
References: <4145BD2A.7060502@virginia.edu>
* 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