Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 35945475F23 for ; Thu, 21 Nov 2002 06:01:59 -0500 (EST) Received: from web80304.mail.yahoo.com (web80304.mail.yahoo.com [66.218.79.20]) by postgresql.org (Postfix) with SMTP id 6F2F1475F84 for ; Thu, 21 Nov 2002 06:01:20 -0500 (EST) Message-ID: <20021121110122.13906.qmail@web80304.mail.yahoo.com> Received: from [203.87.150.116] by web80304.mail.yahoo.com via HTTP; Thu, 21 Nov 2002 03:01:22 PST Date: Thu, 21 Nov 2002 03:01:22 -0800 (PST) From: Ludwig Lim Subject: Re: Drop NOT NULL constraint !!! To: mallah@trade-india.com Cc: PostgreSQL Mailing List In-Reply-To: <50448.203.145.129.4.1037819878.squirrel@mail.trade-india.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/325 X-Sequence-Number: 10467 --- mallah@trade-india.com wrote: > > do a \d tablename > > for the name of the contraint. > say its $1 > the do > > psql> alter table drop contstraint "$1" > RESTRICT; > I alter a table with by adding a foriegn key constraint. ALTER TABLE sc_city ADD CONSTRAINT cons_fkey FOREIGN KEY state_cd REFERENCE sc_state(state_cd); After altering the table I executed "\d " show the following: Triggers: RI_ConstraintTrigger_56743429 I'm surprised that name of constraint doesn't appear even though I explictly name it. Is there a way to show the name of the constraint? Should I do : ALTER TABLE sc_city DROP CONSTRAINT RI_ConstraintTrigger+5674329 RESTRICT ? Thank you very much, ludwig __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com