pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
ALTER TABLE ADD CONSTRAINT 2+ messages / 2 participants [nested] [flat]
* ALTER TABLE ADD CONSTRAINT @ 2007-07-19 17:58 José Roberto Motta Garcia <garcia@cptec.inpe.br> 2007-07-19 21:48 ` Re: ALTER TABLE ADD CONSTRAINT Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 1 reply; 2+ messages in thread From: José Roberto Motta Garcia @ 2007-07-19 17:58 UTC (permalink / raw) To: 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 ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: ALTER TABLE ADD CONSTRAINT 2007-07-19 17:58 ALTER TABLE ADD CONSTRAINT José Roberto Motta Garcia <garcia@cptec.inpe.br> @ 2007-07-19 21:48 ` Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2007-07-19 21:48 UTC (permalink / raw) To: José Roberto Motta Garcia <garcia@cptec.inpe.br>; +Cc: pgsql-admin =?ISO-8859-1?Q?Jos=E9_Roberto_Motta_Garcia?= <garcia@cptec.inpe.br> writes: > 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) I can't reproduce any such misbehavior here. What PG version is this exactly? What are you doing to "check the DDL"? regards, tom lane ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2007-07-19 21:48 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2007-07-19 17:58 ALTER TABLE ADD CONSTRAINT José Roberto Motta Garcia <garcia@cptec.inpe.br> 2007-07-19 21:48 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox