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

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 (view raw or flat)
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

pgsql-admin by date

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

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