pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
dropping a table constraint 2+ messages / 2 participants [nested] [flat]
* dropping a table constraint @ 2004-09-13 15:30 Jodi Kanter <jkanter@virginia.edu> 0 siblings, 0 replies; 2+ messages in thread From: Jodi Kanter @ 2004-09-13 15:30 UTC (permalink / raw) To: pgsql-admin 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> ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: dropping a table constraint @ 2004-09-13 15:48 Lee Wu <Lwu@mxlogic.com> 0 siblings, 0 replies; 2+ messages in thread From: Lee Wu @ 2004-09-13 15:48 UTC (permalink / raw) To: Jodi Kanter <jkanter@virginia.edu>; pgsql-admin Did you try: alter table file_info drop constraint "$1"; -----Original Message----- From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Jodi Kanter Sent: Monday, September 13, 2004 9:31 AM To: Postgres Admin List Subject: [ADMIN] dropping a table constraint 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> ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2004-09-13 15:48 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2004-09-13 15:30 dropping a table constraint Jodi Kanter <jkanter@virginia.edu> 2004-09-13 15:48 Re: dropping a table constraint Lee Wu <Lwu@mxlogic.com>
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