pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Announce <truthhurts@insightbb.com>
To: PostgreSQL SQL List <pgsql-sql@postgresql.org>
Subject: Primary and Foreign Key?
Date: Thu, 22 Sep 2005 20:13:35 -0500
Message-ID: <KBEKKNMFLELKGIADDEPEMEMICAAA.truthhurts@insightbb.com> (raw)

I have the following related tables:

PEOPLE
--------------
peopleid pkey,
name,
etc


GROUPS
-------------
groupid pkey,
description,
etc


PEOPLEGROUPS
-------------------
peopleid pkey/fkey,
groupid pkey/fkey


What is the CORRECT way (in Postgres) to define the PEOPLEGROUPS table so
that it has both the double primary key AND still acts as a foreign key for
people.peopleid and groups.groupid? Can i specify both or is this not
necessary? Any suggestions would be appreciated.

Thanks!

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.4/109 - Release Date: 9/21/2005




view thread (3+ messages)  latest in thread

Message-ID: <KBEKKNMFLELKGIADDEPEMEMICAAA.truthhurts@insightbb.com>
Permalink:  ../KBEKKNMFLELKGIADDEPEMEMICAAA.truthhurts@insightbb.com/
Also on:    postgresql.org/message-id/KBEKKNMFLELKGIADDEPEMEMICAAA.truthhurts@insightbb.com

 · 

reply

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: truthhurts@insightbb.com
  Subject: Re: Primary and Foreign Key?
  In-Reply-To: <KBEKKNMFLELKGIADDEPEMEMICAAA.truthhurts@insightbb.com>

* 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