Re: Help with seq numbers...

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Cristian Prieto <cristian(at)clickdiario(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Help with seq numbers...
Date: 2005-02-14 21:50:26
Message-ID: 20050214215026.GA12230@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Feb 14, 2005 at 15:12:56 -0600,
Cristian Prieto <cristian(at)clickdiario(dot)com> wrote:
>
> And it is working fine, but when I get a Unique_Violation (cuz there is a iduser already) the sequence still advance to the next value. There is any way to rollback or avoid holes in the sequence? I've read the manual and it says that nextval and currval could not be rolled back, that means that there is no way to avoid that trouble?

Why do you want to do this? If you really must have consecutive values, you
need to take a different approach. If you just need unique values, then
don't worry about gaps.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message javier wilson 2005-02-14 22:18:07 Re: Help with seq numbers...
Previous Message Michael Fuhr 2005-02-14 21:42:56 Re: Privileges question