Re: table with sort_key without gaps

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Janning Vygen <vygen(at)gmx(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: table with sort_key without gaps
Date: 2004-12-13 19:11:07
Message-ID: 20041213191107.GC11248@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Dec 13, 2004 at 19:37:41 +0100,
Janning Vygen <vygen(at)gmx(dot)de> wrote:
>
> the other reason why i wanted gapless sequences was that i would love to use
> the id in an URL. But this is easy to manage to translate a positional id in
> an URL to the database id.

For this you probably shouldn't be using the sort value (even if you use
numeric to avoid having to renumber). This should use a real primary key.
This you definitely can use a sequence for if there isn't a natural
primary key.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-12-13 19:21:04 Re: pg_restore taking 4 hours!
Previous Message Tom Lane 2004-12-13 19:09:24 Re: Substring question