Re: data dependent sequences? - Mailing list pgsql-sql

From Ragnar
Subject Re: data dependent sequences?
Date
Msg-id 1184515497.5778.141.camel@localhost.localdomain
Whole thread Raw
In response to data dependent sequences?  ("Stuart McGraw" <smcg2297@frii.com>)
List pgsql-sql
On sun, 2007-07-15 at 09:28 -0600, Stuart McGraw wrote:
> Advice requested :-)  I have a table like:
> 
> CREATE TABLE items (
>     id INT,
>     typ INT    ...
>     PRIMAY KEY (seq,typ));
> 
> I would like 'id' to be like a SERIAL except that I
> want independent sequences for each value of 'typ'.

what possible advantage could there be to that?

if you need gapless series, then sequences (and serial)
are not adequate anyways.

just use one sequence.

gnari




pgsql-sql by date:

Previous
From: "Stuart McGraw"
Date:
Subject: data dependent sequences?
Next
From: chester c young
Date:
Subject: Re: data dependent sequences?