Re: Drop constraint in PostgreSQL 7.1.2 - Mailing list pgsql-general

From Stephan Szabo
Subject Re: Drop constraint in PostgreSQL 7.1.2
Date
Msg-id 20030204114030.S7488-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: Drop constraint in PostgreSQL 7.1.2  ("Vilson farias" <vilson.farias@digitro.com.br>)
List pgsql-general
On Tue, 4 Feb 2003, Vilson farias wrote:

>
>   Ok, but I'm having some problems to identify wich triggers should be
> destroyed. How can I remove those triggers? Can I just delete these records
> from pg_trigger?

>
> ALTER TABLE cham_atendimento
>        ADD CONSTRAINT RLoginXAtend FOREIGN KEY (pa, dt_login)
>        REFERENCES pa__login;
>
> bxs=# select * from pg_trigger where tgconstrname = 'rloginxatend';

 - These three constraints are the ones you need

> bxs=# drop trigger RI_ConstraintTrigger_20885 on cham_atendimento;
> ERROR:  DropTrigger: there is no trigger ri_constrainttrigger_20885 on
> relation cham_atendimento
> bxs=# drop trigger RI_ConstraintTrigger_20885 on pa__login;
> ERROR:  DropTrigger: there is no trigger ri_constrainttrigger_20885 on
> relation pa__login
>
> How can I remove those triggers? Can I just delete these records from

You'll need to double quote the names because they're mixed case.

> pg_trigger?

Not without also altering reltriggers on pg_class.


pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: not exactly a bug report, but surprising behaviour
Next
From: Bruno Wolff III
Date:
Subject: Re: now() more precise than the transaction