Re: [SQL] Sequential non unique IDs

2008-04-06 Thread John Reeve
. Thanks again! - John -Original Message- From: Craig Ringer [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 01, 2008 9:24 PM To: John Reeve Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Sequential non unique IDs John Reeve wrote: > I've already considered: > 1. I can'

[SQL] Sequential non unique IDs

2008-04-01 Thread John Reeve
I have the following scenario: A 'task' table that has the fields: id => primary key, updated on each insert using a sequence customerid => integer localid => integer I need the localid to be sequential and unique per unique customerid. The data needs to look like this: 1, 92, 1