Re: Multi row sequence?

Поиск
Список
Период
Сортировка
От Ciprian Popovici
Тема Re: Multi row sequence?
Дата
Msg-id 20041219224314.7fa547e7@xxx
обсуждение исходный текст
Ответ на Re: Multi row sequence?  (Ragnar Hafstað <gnari@simnet.is>)
Ответы Re: Multi row sequence?
Список pgsql-general
On Sun, 19 Dec 2004 13:51:39 +0000 Ragnar Hafstað <gnari@simnet.is> wrote:
> 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@wolff.to>
wrote:
> > > On Fri, Dec 17, 2004 at 11:10:12 -0000,
> > >   Filip Wuytack <fwuytack@fgscapital.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?

Not if you need the main key values to stay put.

--
Ciprian Popovici

В списке pgsql-general по дате отправления:

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: A "cascade on delete" constraints deletes AFTER the source is gone??
Следующее
От: Ragnar Hafstað
Дата:
Сообщение: Re: Multi row sequence?