Re: Resetting a sequence's last value... - Mailing list pgsql-general

From Tom Lane
Subject Re: Resetting a sequence's last value...
Date
Msg-id 7281.1051476843@sss.pgh.pa.us
Whole thread Raw
In response to Re: Resetting a sequence's last value...  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-general
Bruno Wolff III <bruno@wolff.to> writes:
>   Sean Chittenden <sean@chittenden.org> wrote:
>> Thoughts?  I got a post offlist suggesting writing a C function, but
>> that's pretty dependent on the backend and would have to be recompiled
>> from version to version, something I'm not too wild about.  -sc

> What would seem logical to me is using the iscalled parameter to setval
> to determine this. If you call setval('seq', 1, false), I think it
> would be reasonable for the currval('seq') to be undefined until
> nextval('seq') or setval with iscalled=true is called.

I don't believe he wants to do a setval, as the effects of that are
global.

            regards, tom lane


pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Resetting a sequence's last value...
Next
From: Sean Chittenden
Date:
Subject: Re: Resetting a sequence's last value...