Skip site navigation (1) Skip section navigation (2)

Re: [SQL] ALTER TABLE ... DROP CONSTRAINT

From: Rajesh Kumar Mallah <mallah(at)trade-india(dot)com>
To: Elielson Fontanezi <ElielsonF(at)prodam(dot)sp(dot)gov(dot)br>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>,pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: [SQL] ALTER TABLE ... DROP CONSTRAINT
Date: 2003-07-30 19:25:18
Message-ID: 3F281B9E.1050804@trade-india.com (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-sql
if the constraint are named $1 $2 etc you will need to quote them eg

ALTER TABLE xyz DROP CONSTRAINT "$1" ;

in some version you may require

ALTER TABLE xyz DROP CONSTRAINT "$1"  RESTRICT;

What is ur version btw?

try to post the table structure also.

regds mallah.

Elielson Fontanezi wrote:

> Hi all!
>  
>     Who can tell me what postgres version supports ALTER TABLE... DROP 
> CONSTRAINT without
> the need of droping the table to remove a simple coinstraint. (link)
>
>                                    >\\\!/<     55 11 5080 9283
>                                    !_"""_!     Elielson Fontanezi
>                                    (O) (o)     PRODAM - Technical 
> Support Analyst
> -------------------------------oOOO--(_)--OOOo-----------------------------------
>      Success usually comes to those who are too busy to be looking for it.
>                             oooo0          0oooo
> ---------------------------(    )----------(    
> )--------------------------------
>                             \  (            )  /
>                              \_/            \_/
>
>  




In response to

pgsql-sql by date

Next:From: Josh BerkusDate: 2003-07-30 19:25:25
Subject: Re: Fwd: Bad Join moment - how is this happening?
Previous:From: Josh BerkusDate: 2003-07-30 18:08:56
Subject: Re: Problem using Subselect results

pgsql-general by date

Next:From: Richard HuxtonDate: 2003-07-30 19:41:23
Subject: Re: Don't removes/recycles WAL files at all
Previous:From: Claudio LapidusDate: 2003-07-30 19:16:23
Subject: hexadecimal to decimal

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group