pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rajesh Kumar Mallah. <mallah@trade-india.com>
To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
To: pgsql-sql@postgresql.org
Subject: Re: Is Dropping a column "CHECK" constraint possible?
Date: Sat, 6 Jul 2002 10:33:16 +0530
Message-ID: <200207061033.16836.mallah@trade-india.com> (raw)
In-Reply-To: <00e101c224a6$81ee3bc0$0200a8c0@SOL>
References: <200207051729.42137.mallah@trade-india.com>
	<00e101c224a6$81ee3bc0$0200a8c0@SOL>


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.







view thread (4+ messages)  latest in thread

Message-ID: <200207061033.16836.mallah@trade-india.com>
Permalink:  ../200207061033.16836.mallah@trade-india.com/
Also on:    postgresql.org/message-id/200207061033.16836.mallah@trade-india.com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mallah@trade-india.com, chriskl@familyhealth.com.au
  Subject: Re: Is Dropping a column "CHECK" constraint possible?
  In-Reply-To: <200207061033.16836.mallah@trade-india.com>

* 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