From: Ragnar <gnari@hive.is>
To: Stuart McGraw <smcg2297@frii.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: data dependent sequences?
Date: Sun, 15 Jul 2007 16:04:56 +0000
Message-ID: <1184515497.5778.141.camel@localhost.localdomain> (raw)
In-Reply-To: <AKEFJAHAPDBEDKIICNJKMEJPCDAA.smcg2297@frii.com>
References: <AKEFJAHAPDBEDKIICNJKMEJPCDAA.smcg2297@frii.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: gnari@hive.is, smcg2297@frii.com
Subject: Re: data dependent sequences?
In-Reply-To: <1184515497.5778.141.camel@localhost.localdomain>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox