Re: sequence last_value not accurate if sequence has never been used

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Wayne Schroeder <raz(at)chewies(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: sequence last_value not accurate if sequence has never been used
Date: 2003-09-01 00:28:58
Message-ID: 4095.1062376138@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Wayne Schroeder <raz(at)chewies(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Guy Thornley 2003-09-01 04:22:19 Vacuum I/O throttling
Previous Message Wayne Schroeder 2003-08-31 23:01:59 sequence last_value not accurate if sequence has never been used