Drop constraint in PostgreSQL 7.1.2

Started by Vilson fariasabout 23 years ago2 messagesgeneral
Jump to latest
#1Vilson farias
vilson.farias@digitro.com.br

Greetings,

How can I drop a referencial integrity constraint in 7.1.2 once there are no such thing before 7.2 release? Can I just execute DROP TRIGGERs to get constraints dropped?

Thanks in advance.

--------------------------------------------------------------------------------
José Vilson de Mello de Farias
Software Engineer

Dígitro Tecnologia Ltda - www.digitro.com.br
APC - Customer Oriented Applications
E-mail: vilson.farias@digitro.com.br
Tel.: +55 48 281 7158
ICQ 11866179

#2Stephan Szabo
sszabo@megazone23.bigpanda.com
In reply to: Vilson farias (#1)
Re: Drop constraint in PostgreSQL 7.1.2

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.