Fix ALTER SEQUENCE so that it does not affect the value of currval() for
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 25 Oct 2007 18:54:03 +0000 (18:54 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 25 Oct 2007 18:54:03 +0000 (18:54 +0000)
commit4b3463b53f569a8cd334dedcbfe70d17a50e5b33
tree4fe39e9078559d5ad8eca44b3c197d8465465617
parentc5367081fd84d512cbc0190447f3304a8b0bc8e1
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.
doc/src/sgml/func.sgml
doc/src/sgml/ref/alter_sequence.sgml
src/backend/commands/sequence.c