Bug about 'Foreign Key' - Mailing list pgsql-bugs

From Cid R Andrade
Subject Bug about 'Foreign Key'
Date
Msg-id 00dc01c0b6cc$4c9e4bc0$543c620a@catnet.com.br
Whole thread Raw
Responses Re: Bug about 'Foreign Key'
List pgsql-bugs
PostgreSQL Developers,

I have a PostgreSQL 7.0.2 running at Conectiva Linux, with kernel 2.2.14, w=
ith 56 Mb of data.

I'd created a table:
Create Table Andamento (
    Etiqueta integer not null,
    CodTecnico integer not null,
    DtInicio timestamp not null,
    DtLiberacao timestamp null,
    Primary Key (Etiqueta),
    Foreign Key (Etiquetas) References Etiquetas (Etiqueta) On Delete Casca=
de)
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
I wrong a field name in Foreign Key declaration, and PostgreSQL created it!
Before this, I always named triggers and constraints, but, at this time, I'=
d tried this way.
Well, look the trigger at table Etiquetas:
CREATE CONSTRAINT TRIGGER "<unnamed>" AFTER DELETE ON "etiquetas"  NOT DEFE=
RRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE "RI_FKey_noaction=
_del" ('<unnamed>', 'andamento', 'etiquetas', 'UNSPECIFIED', 'etiquetas', '=
etiqueta');

It says exists a field named etiquetas at table Andamento.
I'd droped table andamento (Drop Table Andamento) and the trigger referenci=
ng it didn't droped.

I solved it with pg_dump.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Please help On Alternative Database Location
Next
From: Peter Eisentraut
Date:
Subject: Re: Please help On Alternative Database Location