pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
ALTER TABLE ... DROP CONSTRAINT
6+ messages / 6 participants
[nested] [flat]

* ALTER TABLE ... DROP CONSTRAINT
@ 2003-07-30 15:52 Elielson Fontanezi <ElielsonF@prodam.sp.gov.br>
  2003-07-30 16:07 ` Re: ALTER TABLE ... DROP CONSTRAINT Andrew Gould <andrewgould@yahoo.com>
  2003-07-30 16:21 ` Re: ALTER TABLE ... DROP CONSTRAINT Rod Taylor <rbt@rbt.ca>
  2003-07-30 16:25 ` Re: [SQL] ALTER TABLE ... DROP CONSTRAINT Chad Thompson <chad@weblinkservices.com>
  2003-07-30 16:45 ` Re: [SQL] ALTER TABLE ... DROP CONSTRAINT George Weaver <georgew1@mts.net>
  2003-07-30 19:25 ` Re: [SQL] ALTER TABLE ... DROP CONSTRAINT Rajesh Kumar Mallah <mallah@trade-india.com>
  0 siblings, 5 replies; 6+ messages in thread

From: Elielson Fontanezi @ 2003-07-30 15:52 UTC (permalink / raw)
  To: pgsql-general <pgsql-general@postgresql.org>; pgsql-sql

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
---------------------------(    )----------(
)--------------------------------
                            \  (            )  /
                             \_/            \_/

 

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: ALTER TABLE ... DROP CONSTRAINT
  2003-07-30 15:52 ALTER TABLE ... DROP CONSTRAINT Elielson Fontanezi <ElielsonF@prodam.sp.gov.br>
@ 2003-07-30 16:07 ` Andrew Gould <andrewgould@yahoo.com>
  4 siblings, 0 replies; 6+ messages in thread

From: Andrew Gould @ 2003-07-30 16:07 UTC (permalink / raw)
  To: Elielson Fontanezi <ElielsonF@prodam.sp.gov.br>; pgsql-general <pgsql-general@postgresql.org>; pgsql-sql

--- Elielson Fontanezi <ElielsonF@prodam.sp.gov.br>
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)
> 
> Elielson Fontanezi
> PRODAM - Technical Support
> Analyst

I performed that task yesterday using PostgreSQL
7.3.3:

Alter table mkt drop constraint mkt_pkey;

I don't know if it's supported in earlier versions.

Best regards,

Andrew Gould



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: ALTER TABLE ... DROP CONSTRAINT
  2003-07-30 15:52 ALTER TABLE ... DROP CONSTRAINT Elielson Fontanezi <ElielsonF@prodam.sp.gov.br>
@ 2003-07-30 16:21 ` Rod Taylor <rbt@rbt.ca>
  4 siblings, 0 replies; 6+ messages in thread

From: Rod Taylor @ 2003-07-30 16:21 UTC (permalink / raw)
  To: Elielson Fontanezi <ElielsonF@prodam.sp.gov.br>; +Cc: pgsql-general <pgsql-general@postgresql.org>; pgsql-sql

I think you can do some constraints in 7.2, but 7.3 will allow dropping
them all in that fashion.

On Wed, 2003-07-30 at 11:52, 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
> ---------------------------(    )----------(   
> )--------------------------------
>                             \  (            )  /
>                              \_/            \_/
> 
> 
>  

Attachments:

  signature.asc (application/pgp-signature, 186B) download

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [SQL] ALTER TABLE ... DROP CONSTRAINT
  2003-07-30 15:52 ALTER TABLE ... DROP CONSTRAINT Elielson Fontanezi <ElielsonF@prodam.sp.gov.br>
@ 2003-07-30 16:25 ` Chad Thompson <chad@weblinkservices.com>
  4 siblings, 0 replies; 6+ messages in thread

From: Chad Thompson @ 2003-07-30 16:25 UTC (permalink / raw)
  To: pgsql-general <pgsql-general@postgresql.org>; pgsql-sql


  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
  ---------------------------(    )----------(    )--------------------------------
                              \  (            )  /
                               \_/            \_/

 
7.3 supports the drop constraint.  The only exception begin if you upgraded your database.  It keeps the existing trigger like constraints if youve moved from 7.1 or 7.2.  But these triggers can be dropped as well.

HTH
Chad

P.S. Great signature! :-)

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [SQL] ALTER TABLE ... DROP CONSTRAINT
  2003-07-30 15:52 ALTER TABLE ... DROP CONSTRAINT Elielson Fontanezi <ElielsonF@prodam.sp.gov.br>
@ 2003-07-30 16:45 ` George Weaver <georgew1@mts.net>
  4 siblings, 0 replies; 6+ messages in thread

From: George Weaver @ 2003-07-30 16:45 UTC (permalink / raw)
  To: Elielson Fontanezi <ElielsonF@prodam.sp.gov.br>; pgsql-general <pgsql-general@postgresql.org>; pgsql-sql

It works in 7.3.2.

George
  ----- Original Message ----- 
  From: Elielson Fontanezi 
  To: pgsql-general ; pgsql-sql 
  Sent: Wednesday, July 30, 2003 10:52 AM
  Subject: [SQL] ALTER TABLE ... DROP CONSTRAINT


  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
  ---------------------------(    )----------(    )--------------------------------
                              \  (            )  /
                               \_/            \_/

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [SQL] ALTER TABLE ... DROP CONSTRAINT
  2003-07-30 15:52 ALTER TABLE ... DROP CONSTRAINT Elielson Fontanezi <ElielsonF@prodam.sp.gov.br>
@ 2003-07-30 19:25 ` Rajesh Kumar Mallah <mallah@trade-india.com>
  4 siblings, 0 replies; 6+ messages in thread

From: Rajesh Kumar Mallah @ 2003-07-30 19:25 UTC (permalink / raw)
  To: Elielson Fontanezi <ElielsonF@prodam.sp.gov.br>; +Cc: pgsql-general <pgsql-general@postgresql.org>; pgsql-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
> ---------------------------(    )----------(    
> )--------------------------------
>                             \  (            )  /
>                              \_/            \_/
>
>  






^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2003-07-30 19:25 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-07-30 15:52 ALTER TABLE ... DROP CONSTRAINT Elielson Fontanezi <ElielsonF@prodam.sp.gov.br>
2003-07-30 16:07 ` Andrew Gould <andrewgould@yahoo.com>
2003-07-30 16:21 ` Rod Taylor <rbt@rbt.ca>
2003-07-30 16:25 ` Chad Thompson <chad@weblinkservices.com>
2003-07-30 16:45 ` George Weaver <georgew1@mts.net>
2003-07-30 19:25 ` Rajesh Kumar Mallah <mallah@trade-india.com>

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