X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id C6D5C474E4F for ; Wed, 26 Feb 2003 09:48:05 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 69428-02 for ; Wed, 26 Feb 2003 09:47:55 -0500 (EST) Received: from jordgubbe.pingpong.net (81.milagro.bahnhof.net [195.178.168.81]) by postgresql.org (Postfix) with ESMTP id 784F14758F1 for ; Wed, 26 Feb 2003 09:47:45 -0500 (EST) Received: from pingpong.net (localhost [127.0.0.1]) by jordgubbe.pingpong.net (8.12.6/8.12.6) with ESMTP id h1QElg5J030855; Wed, 26 Feb 2003 15:47:42 +0100 (CET) (envelope-from kudo@pingpong.net) Message-ID: <3E5CD38E.3040704@pingpong.net> Date: Wed, 26 Feb 2003 15:47:42 +0100 From: Patrik Kudo User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.2.1) Gecko/20030130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: rute solipa Cc: pgsql-sql@postgresql.org Subject: Re: disable constraints References: <5.1.1.6.0.20030226143157.00b70000@mail.eselx.ipl.pt> In-Reply-To: <5.1.1.6.0.20030226143157.00b70000@mail.eselx.ipl.pt> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/581 X-Sequence-Number: 11979 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