Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id E58C29F9FC6 for ; Sun, 2 Sep 2007 18:24:34 -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 33592-02-6 for ; Sun, 2 Sep 2007 18:24:22 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.242]) by postgresql.org (Postfix) with ESMTP id C8F5F9F9FBF for ; Sun, 2 Sep 2007 18:20:52 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c36so253249ana for ; Sun, 02 Sep 2007 14:20:51 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=PAJveu6W9gJHtV7eANc4N5fgKy2BRPTtb7yHN9QxYGmb1otLgC1Eo1/m47xMu0ha5rXAaDmQ5LJ/J5B8PbWS071RGen8xlhJhf0keOgNBtfhqboetIc6z9imbHmtTH+g9NrtmxIsl+aJeqfaLDK5/q1biSZvERUmErkRDv/jlG8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=hB0l7W55jU3Jv0S7c2xwcq/8UfYbP12WWWQrufpmu7VlZYGuUJY9iR1tFz7ukwQInrrRrWf0kkSd8jJyNsrb2OfkxEsKEeKGGCVTgcbgJikkD9IdbSUOn52QJgNoE3HnWR2B7VgoNdm4dJMuFhulLvWpbv1pQjJ0hNjSQFKJsz4= Received: by 10.100.191.5 with SMTP id o5mr3221292anf.1188768051750; Sun, 02 Sep 2007 14:20:51 -0700 (PDT) Received: by 10.100.111.10 with HTTP; Sun, 2 Sep 2007 14:20:51 -0700 (PDT) Message-ID: Date: Sun, 2 Sep 2007 16:20:51 -0500 From: "=?UTF-8?Q?Rodrigo_De_Le=C3=B3n?=" To: "L D" Subject: Re: PK & FK & Index Questio Cc: pgsql-sql@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/6 X-Sequence-Number: 29219 On 9/2/07, L D wrote: > Should I set the latter table's FK also to PK? It's sane. > If so, do I need to set an index on the FK even though it's also the primary key? No need to do so.