Re: data dependent sequences?

From: Ragnar <gnari(at)hive(dot)is>
To: Stuart McGraw <smcg2297(at)frii(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: data dependent sequences?
Date: 2007-07-15 16:04:56
Message-ID: 1184515497.5778.141.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message chester c young 2007-07-15 16:07:05 Re: data dependent sequences?
Previous Message Stuart McGraw 2007-07-15 15:28:26 data dependent sequences?