Re: adding foreign key constraint locks up table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 28, 2010 at 9:43 AM, Kevin Grittner <Kevin.Grittner@xxxxxxxxxxxx> wrote:
Gurjeet Singh <singh.gurjeet@xxxxxxxxx> wrote:

> how many rows does "bbb" have? And what are the data types of
> column aaa.idand bbb.topic_id?

For that matter, is there a unique index (directly or as the result
of a constraint) on the aaa.id column (by itself)?


Isn't it a requirement that the FKey referenced columns be UNIQUE or PRIMARY KEY'd already?

Regards,
--
gurjeet.singh
@ EnterpriseDB - The Enterprise Postgres Company
http://www.EnterpriseDB.com

singh.gurjeet@{ gmail | yahoo }.com
Twitter/Skype: singh_gurjeet

Mail sent from my BlackLaptop device

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux