Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 3EC8A4758F6 for ; Sat, 6 Jul 2002 00:40:33 -0400 (EDT) Mailbox-Line: From chriskl@familyhealth.com.au Sat Jul 6 00:40:23 2002 Received: from mail.iinet.net.au (symphony-03.iinet.net.au [203.59.3.35]) by postgresql.org (Postfix) with SMTP id 0694D475978 for ; Sat, 6 Jul 2002 00:39:36 -0400 (EDT) Received: (qmail 28796 invoked by uid 666); 6 Jul 2002 04:39:25 -0000 Received: from unknown (HELO SOL) (203.59.159.96) by mail.iinet.net.au with SMTP; 6 Jul 2002 04:39:25 -0000 Message-ID: <00e101c224a6$81ee3bc0$0200a8c0@SOL> From: "Christopher Kings-Lynne" To: "Rajesh Kumar Mallah." , References: <200207051729.42137.mallah@trade-india.com> Subject: Re: Is Dropping a column "CHECK" constraint possible? Date: Sat, 6 Jul 2002 12:35:06 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 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: 200207/74 X-Sequence-Number: 8453 > can anyone please help? > i have a to drop a check contstraint from a column. eg > > tradein_clients=# \d t_a > Table "t_a" > Column | Type | Modifiers > ------------+---------+----------- > company_id | integer | > exp | text | > imp | text | > Check constraints: "$1" (length(imp) > 1) > "aaaaaq" (length(imp) > 1) > > Can i remove to contraints thru ALTER TABLE or similar commands. > I have read the docs for ALTER TABLE but the command described is > not working for me. This should work, so long as you're using postgres 7.2+ ALTER TABLE "t_a" DROP CONSTRAINT "aaaaaq" RESTRICT; Chris