Re: Multi row sequence?

From: Ragnar Hafstað <gnari(at)simnet(dot)is>
To: Ciprian Popovici <ciprian(at)zuavra(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Multi row sequence?
Date: 2004-12-19 13:51:39
Message-ID: 1103464299.1866.4.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, 2004-12-19 at 15:02 +0200, Ciprian Popovici wrote:
> On Sat, 18 Dec 2004 11:07:37 -0600 Bruno Wolff III <bruno(at)wolff(dot)to> wrote:
> > On Fri, Dec 17, 2004 at 11:10:12 -0000,
> > Filip Wuytack <fwuytack(at)fgscapital(dot)com> wrote:
> > > Is it possible to have a sequence (as a multirow prim key), where
> > > sequence (id) only increase per group of data (grp).
> >
> > Why do you want to do this? It would be a lot simpler to generate unique
> > values over the table and that will work just fine if all you need
> > is uniqueness.
>
> Here's a case where what he said would come in handy: arranging a
> particular display order within the individual groups. You have the unique
> key for the entire table, but you need something like a serial restricted
> to just a group of rows.

would a normal sequence not do if that was the only purpose?

gnari

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sim Zacks 2004-12-19 14:11:05 Israel Go-Linux conference
Previous Message Bruce Momjian 2004-12-19 13:47:51 Re: PG8 final when