ALTER TABLE ADD CONSTRAINT - Mailing list pgsql-admin

From José Roberto Motta Garcia
Subject ALTER TABLE ADD CONSTRAINT
Date
Msg-id 469FA659.9010606@cptec.inpe.br
Whole thread Raw
Responses Re: ALTER TABLE ADD CONSTRAINT  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
Hi all,

  I do it in table synop:

ALTER TABLE synop
ADD CONSTRAINT estacoes_fk
FOREIGN KEY (id_estacao)
REFERENCES estacoes

Then I check the DDL and it is like this:
....
CONSTRAINT estacoes_fk FOREIGN KEY (id_estacao, id_estacao) REFERENCES
estacoes (id_estacao, id_estacao)
....

- Why id_estacao is duplicated????
- id_estacao is the only column in pk of estacoes.

Tks

--
Jose Roberto M. Garcia, MSc
Systems Analist - Database Group
Voice: (12) 3186-8405
--
http://www.cptec.inpe.br
http://www.inpe.br


pgsql-admin by date:

Previous
From: "rajneesh"
Date:
Subject: Opening with Netcore Solutions
Next
From: Tom Lane
Date:
Subject: Re: ALTER TABLE ADD CONSTRAINT