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


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to