pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: José Roberto Motta Garcia <garcia@cptec.inpe.br>
To: pgsql-admin@postgresql.org
Subject: ALTER TABLE ADD CONSTRAINT
Date: Thu, 19 Jul 2007 14:58:49 -0300
Message-ID: <469FA659.9010606@cptec.inpe.br> (raw)

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 




view thread (2+ messages)  latest in thread

Message-ID: <469FA659.9010606@cptec.inpe.br>
Permalink:  ../469FA659.9010606@cptec.inpe.br/
Also on:    postgresql.org/message-id/469FA659.9010606@cptec.inpe.br

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: garcia@cptec.inpe.br
  Subject: Re: ALTER TABLE ADD CONSTRAINT
  In-Reply-To: <469FA659.9010606@cptec.inpe.br>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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