Re: simulate multiple primary keysx - Mailing list pgsql-general

From Brandon Metcalf
Subject Re: simulate multiple primary keysx
Date
Msg-id Pine.LNX.4.58L.0907021252380.6476@cedar.geronimoalloys.com
Whole thread Raw
In response to Re: simulate multiple primary keys  (Bill Moran <wmoran@potentialtech.com>)
List pgsql-general
w == wmoran@potentialtech.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

pgsql-general by date:

Previous
From: Bill Moran
Date:
Subject: Re: simulate multiple primary keys
Next
From: Simon Riggs
Date:
Subject: Re: pgAdmin - no_spool