Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id B14919FBCA4 for ; Wed, 25 Jul 2007 14:25:57 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 29874-08 for ; Wed, 25 Jul 2007 14:25:52 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from web31809.mail.mud.yahoo.com (web31809.mail.mud.yahoo.com [68.142.207.72]) by postgresql.org (Postfix) with SMTP id 1862B9FBC87 for ; Wed, 25 Jul 2007 14:25:54 -0300 (ADT) Received: (qmail 91032 invoked by uid 60001); 25 Jul 2007 17:25:53 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=OXqddkmuX50W11KbXj/rCaFps7cfm7jiESet3dk5h3SXg4ebCk2vIzvyv9UU8hbJkW8flFp9jLFeiD5srLhBFddR0WwS5lqXXc6zbmim2HSQDsfY1duVjQkYPX2+1LRM+I56AZ0HoO0hBXtZpphTL9nh2eXcjvxOrjXkV3B1XEU=; X-YMail-OSG: DXhauucVM1kJLnORzzHNUOVc.h.noxfzk0WbmeIKxxWvDNwosU.rYfZ_0vbNxWdSyAin7uplPg-- Received: from [12.180.237.138] by web31809.mail.mud.yahoo.com via HTTP; Wed, 25 Jul 2007 10:25:53 PDT Date: Wed, 25 Jul 2007 10:25:53 -0700 (PDT) From: Richard Broersma Jr Subject: Re: primary key and foreign key To: Jessica Richard , pgsql-admin@postgresql.org In-Reply-To: <768150.12661.qm@web56410.mail.re3.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <219041.90797.qm@web31809.mail.mud.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.229 tagged_above=0 required=5 tests=AWL=0.228, BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200707/283 X-Sequence-Number: 26264 --- Jessica Richard wrote: > Just want to be very clear that: > > 1. adding a primary key will have an implicit index automatically on the column(s). > > 2. Adding a foreign key will NOT have an index created automatically, it only does the > referencing work. If an index is needed on the F-key column, it has to be created, right? Correct. Regards, Richard Broersma Jr.