Re: disable constraints

From: Patrik Kudo <kudo(at)pingpong(dot)net>
To: rute solipa <rutes(at)eselx(dot)ipl(dot)pt>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: disable constraints
Date: 2003-02-26 14:47:42
Message-ID: 3E5CD38E.3040704@pingpong.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi!

use "alter table ??? drop constraint ???"

example:

create table asdf (userid text, foreign key (userid) references
person(userid) on delete cascade);

\d asdf
Table "public.asdf"
Column | Type | Modifiers
--------+------+-----------
userid | text |
Foreign Key constraints: $1 FOREIGN KEY (userid) REFERENCES
person(userid) ON UPDATE NO ACTION ON DELETE CASCADE

alter table asdf drop constraint "$1";

Regards,
Patrik Kudo

rute solipa wrote:
> hello,
>
> does anyone nows how can i disable/enable table or column constraints?
>
> in oracle it's possible to disable constraints like this:
>
> alter table tb_1
> disable primary key;
>
> best regards,
> rute
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message george young 2003-02-26 15:32:20 Design Q.:logic in app or db?
Previous Message rute solipa 2003-02-26 14:38:31 disable constraints