Re: Is Dropping a column "CHECK" constraint possible?

From: "Rajesh Kumar Mallah(dot)" <mallah(at)trade-india(dot)com>
To: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Is Dropping a column "CHECK" constraint possible?
Date: 2002-07-06 05:03:16
Message-ID: 200207061033.16836.mallah@trade-india.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


Yup it did!.
Thanks a ton,

it was there in the ALTER TABLE documentation
i overlooked :-(

regds
mallah.

On Saturday 06 July 2002 10:05, Christopher Kings-Lynne wrote:
> > 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

--
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)

Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Carmen Wai 2002-07-06 06:45:12 Problem on PostgreSQL (error code, store procedures)
Previous Message Christopher Kings-Lynne 2002-07-06 04:35:06 Re: Is Dropping a column "CHECK" constraint possible?