Re: simulate multiple primary keysx

From: Brandon Metcalf <brandon(at)geronimoalloys(dot)com>
To: Bill Moran <wmoran(at)potentialtech(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: simulate multiple primary keysx
Date: 2009-07-02 17:55:11
Message-ID: Pine.LNX.4.58L.0907021252380.6476@cedar.geronimoalloys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

w == wmoran(at)potentialtech(dot)com writes:

...

w> Your primary key can span multiple columns, i.e.
w> PRIMARY KEY(jobclock_id, employee_id, machine_id)
w> Could be more columns.

w> Keep in mind that this ensures that the combination of all those
w> columns is unique, which may or may not be what you want.

Sure. I realize that a primary key can be made up of multiple
columns, but a unique constraint across the columns I need as
suggested by Matthew is what I was looking for.

Thanks.

--
Brandon

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Simon Riggs 2009-07-02 18:03:12 Re: pgAdmin - no_spool
Previous Message Bill Moran 2009-07-02 17:40:16 Re: simulate multiple primary keys