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

Disabling constraints

From: "Kumar" <sgnerd(at)yahoo(dot)com(dot)sg>
To: "psql" <pgsql-sql(at)postgresql(dot)org>
Subject: Disabling constraints
Date: 2004-02-18 05:13:59
Message-ID: 00bf01c3f5f3$c62caae0$ (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
Dear friends,

I am working opn Postgres 7.3.4 on RH Linux 7.2.

I wanted to disable constraints.

Alter table 'table name' disable constraint 'constraint name'; doesn't work.

I got some information from google, which says about indirect way of disabling and enabling a constraint, as follows.
update pg_class set reltriggers=0 where relname = 'crm.activities';
update pg_class set reltriggers = count(*) from pg_trigger where pg_class.oid=tgrelid and relname='crm.activities';

Also doesnt work. 

Is there a way to do it?


pgsql-sql by date

Next:From: sadDate: 2004-02-18 06:14:29
Subject: Re: bytea or blobs?
Previous:From: Tom LaneDate: 2004-02-18 05:10:05
Subject: Re: Indexes and statistics

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