Re: sequence last_value not accurate if sequence has never been used - Mailing list pgsql-bugs

From Tom Lane
Subject Re: sequence last_value not accurate if sequence has never been used
Date
Msg-id 4095.1062376138@sss.pgh.pa.us
Whole thread Raw
In response to sequence last_value not accurate if sequence has never been used  (Wayne Schroeder <raz@chewies.net>)
List pgsql-bugs
Wayne Schroeder <raz@chewies.net> writes:
> IMHO, it would be good for the last_value to come back null if is_called
> is false.  Don't know if that's possible or even a good idea --

It's not really very practical; among other things you'd lose the
ability to specify a START value different from MIN.  Of course, if we
wanted to break backwards compatibility wholesale, we could doubtless
add a separate column for START, do away with is_called altogether in
favor of representing not-iscalled by last_value = null, etc.  But I
doubt it's worth the pain of breaking clients that know the existing
definitions of these fields.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Wayne Schroeder
Date:
Subject: sequence last_value not accurate if sequence has never been used
Next
From: Guy Thornley
Date:
Subject: Vacuum I/O throttling