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

Pgsqlv7.3RC1, pgadminII v 1.4.0 Dropping a field does not drop asociate foreign key

From: "Rafael Villalobos Prats" <rvillalobos(at)asapci(dot)es>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: Pgsqlv7.3RC1, pgadminII v 1.4.0 Dropping a field does not drop asociate foreign key
Date: 2002-11-22 17:07:30
Message-ID: DAE20F19E91DDA47B74F76B7BC07C2430287C7@88.Red-80-33-183.pooles.rima-tde.net (view raw or flat)
Thread:
Lists: pgsql-bugs
I have the next table:

CREATE TABLE aenor_subexpediente (
  id_aenor_subexpediente int4 DEFAULT
nextval('"aenor_subexpe_id_aenor_sube_seq"'::text) NOT NULL, 
  subexpediente varchar(30), 
  id_tecnico int4, 
  id_delegacion int4, 
  id_contacto int4, 
  id_cnae int4, 
  alcance_certificacion varchar(100), 
  id_t_aenor_subexpediente int4, 
  id_area int4, 
  CONSTRAINT aenor_subexpediente_pkey PRIMARY KEY
(id_aenor_subexpediente), 
  CONSTRAINT id_area_fk FOREIGN KEY (id_area) REFERENCES tm_area
(id_area) ON DELETE SET NULL ON UPDATE CASCADE NOT DEFERRABLE INITIALLY
IMMEDIATE, 
  CONSTRAINT id_cnae_fk FOREIGN KEY (id_cnae) REFERENCES cnae (id_cnae)
ON DELETE SET NULL ON UPDATE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE,

  CONSTRAINT id_contacto_fk FOREIGN KEY (id_contacto) REFERENCES
contactos (id_contacto) ON DELETE SET NULL ON UPDATE CASCADE NOT
DEFERRABLE INITIALLY IMMEDIATE, 
  CONSTRAINT id_delegacion_fk FOREIGN KEY (id_delegacion) REFERENCES
tm_delegaciones (id_delegacion) ON DELETE SET NULL ON UPDATE CASCADE NOT
DEFERRABLE INITIALLY IMMEDIATE, 
  CONSTRAINT id_t_aenor_subexpediente_fk FOREIGN KEY
(id_t_aenor_subexpediente) REFERENCES t_aenor_subexpediente
(id_t_aenor_subexpediente) ON DELETE SET NULL ON UPDATE CASCADE NOT
DEFERRABLE INITIALLY IMMEDIATE, 
  CONSTRAINT id_tecnico_fk FOREIGN KEY (id_tecnico) REFERENCES
tm_tecnicos (id_tecnico) ON DELETE SET NULL ON UPDATE CASCADE NOT
DEFERRABLE INITIALLY IMMEDIATE
) WITH OIDS;

I have dropped a field with pgadmin 1.4.0 but the FK is not DROPPED and 
If i try insert a record in this table i get hext error: constraint
id_tecnico_fk: table aenor_subexpediente does not have  an attribute
id_tecnico
when i try dropping the fk i get the error that it does not exist,  

Rafa


pgsql-bugs by date

Next:From: Stefanos HarhalakisDate: 2002-11-22 20:51:16
Subject: vacumm error
Previous:From: Tom LaneDate: 2002-11-22 16:26:55
Subject: Re: dbmirror bug

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