Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 311979FB6B5 for ; Wed, 25 Jul 2007 14:20:51 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 19947-08 for ; Wed, 25 Jul 2007 14:20:47 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from web56410.mail.re3.yahoo.com (web56410.mail.re3.yahoo.com [216.252.111.89]) by postgresql.org (Postfix) with SMTP id AA5E89FB5DD for ; Wed, 25 Jul 2007 14:20:46 -0300 (ADT) Received: (qmail 13306 invoked by uid 60001); 25 Jul 2007 17:20:45 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=IuxgT+kZVqlK2t1T42Z0MMKZaB++MBlmDISSGu+XrZ8+FINO3fghIaNfPN61YasjNvlkT68WyeWc5WIjXczmPo4BcPVzfyW41+Z7Gavc1A1BL3OkFkTu7bGqBHzZef/xVmAMg4g0dY8/8dqJWFjVFW7NrhVC0T9V+pYsY+TPp9A=; X-YMail-OSG: JkISSwQVM1m6ips9xMVco2okfP_WXevIwD1xm96nHqr1iV4alWOfoefLW26LfznkP2zrSfDI2rpAJlT.tE990zT.emELtj4FFzlE Received: from [198.119.134.32] by web56410.mail.re3.yahoo.com via HTTP; Wed, 25 Jul 2007 10:20:45 PDT Date: Wed, 25 Jul 2007 10:20:45 -0700 (PDT) From: Jessica Richard Subject: primary key and foreign key To: pgsql-admin@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-978061239-1185384045=:12661" Content-Transfer-Encoding: 8bit Message-ID: <768150.12661.qm@web56410.mail.re3.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.207 tagged_above=0 required=5 tests=AWL=0.391, BAYES_40=-0.185, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200707/282 X-Sequence-Number: 26263 --0-978061239-1185384045=:12661 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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? Thanks. --------------------------------- Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when. --0-978061239-1185384045=:12661 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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?

Thanks.


Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when. --0-978061239-1185384045=:12661--