ALTER TABLE ADD CONSTRAINT

From: José Roberto Motta Garcia <garcia(at)cptec(dot)inpe(dot)br>
To: pgsql-admin(at)postgresql(dot)org
Subject: ALTER TABLE ADD CONSTRAINT
Date: 2007-07-19 17:58:49
Message-ID: 469FA659.9010606@cptec.inpe.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2007-07-19 21:48:41 Re: ALTER TABLE ADD CONSTRAINT
Previous Message Tommy Gildseth 2007-07-19 13:52:38 Re: Regarding Postgres Monitoring