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 -- but
figured it was worth a note since the following psql log raised my eye
brow a bit.
Wayne
-------------------------------------
policy=> create sequence a start 1;
CREATE SEQUENCE
policy=> select last_value from a;
last_value
------------
1
(1 row)
policy=> select nextval('a');
nextval
---------
1
(1 row)
policy=> select last_value from a;
last_value
------------
1
(1 row)
policy=> select nextval('a');
nextval
---------
2
(1 row)
policy=>
--------------------------------