pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Patrik Kudo <kudo@pingpong.net>
To: rute solipa <rutes@eselx.ipl.pt>
Cc: pgsql-sql@postgresql.org
Subject: Re: disable constraints
Date: Wed, 26 Feb 2003 15:47:42 +0100
Message-ID: <3E5CD38E.3040704@pingpong.net> (raw)
In-Reply-To: <5.1.1.6.0.20030226143157.00b70000@mail.eselx.ipl.pt>
References: <5.1.1.6.0.20030226143157.00b70000@mail.eselx.ipl.pt>

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@postgresql.org so that your
> message can get through to the mailing list cleanly





view thread (5+ messages)  latest in thread

Message-ID: <3E5CD38E.3040704@pingpong.net>
Permalink:  ../3E5CD38E.3040704@pingpong.net/
Also on:    postgresql.org/message-id/3E5CD38E.3040704@pingpong.net

 · 

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: kudo@pingpong.net, rutes@eselx.ipl.pt
  Subject: Re: disable constraints
  In-Reply-To: <3E5CD38E.3040704@pingpong.net>

* 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