From: Bruno Wolff III <bruno@wolff.to>
To: ASAKALAL@bouyguestelecom.fr
Cc: pgsql-sql@postgresql.org
Subject: Re: Foreign key
Date: Sun, 27 Mar 2005 10:33:28 -0600
Message-ID: <20050327163328.GG9280@wolff.to> (raw)
In-Reply-To: <DB7F9CBEADC6D4118F5600508B442F0308611FA4@bt1sqtbe.bpa.bouyguestelecom.fr>
References: <DB7F9CBEADC6D4118F5600508B442F0308611FA4@bt1sqtbe.bpa.bouyguestelecom.fr>
On Fri, Mar 25, 2005 at 16:31:16 +0100,
ASAKALAL@bouyguestelecom.fr wrote:
>
> When i add table with foreign key in my database, this error return : <
> number of referencing and referenced colums for foreign key disagree>.
>
> How resolve this problem ?
Besides what Mike said, one other thing to remember is that if you don't
specify columns in the referenced table, the primary key of that table
is used, NOT columns with names matching those of the referencing table.
In cases like this it have helped if you had copied and pasted an example
displaying the problem in addition to the error message.
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-sql@postgresql.org
Cc: bruno@wolff.to, ASAKALAL@bouyguestelecom.fr
Subject: Re: Foreign key
In-Reply-To: <20050327163328.GG9280@wolff.to>
* 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