Fix ALTER SEQUENCE so that it does not affect the value of currval() for

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 9ddfe034c7d7ee9c4a7dcae1ba37e5e4e5ac2488
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2007-10-25T18:54:03Z
Releases: 8.3.0
Fix ALTER SEQUENCE so that it does not affect the value of currval() for
the sequence.  Also, make setval() with is_called = false not affect the
currval state, either.  Per report from Kris Jurka that an implicit
ALTER SEQUENCE OWNED BY unexpectedly caused currval() to become valid.
Since this isn't 100% backwards compatible, it will go into HEAD only;
I'll put a more limited patch into 8.2.

Files

PathChange+/−
doc/src/sgml/func.sgml modified +14 −9
doc/src/sgml/ref/alter_sequence.sgml modified +11 −2
src/backend/commands/sequence.c modified +24 −13