On Mon, 6 Jun 2005, Tom Lane wrote:
> You could fix that by remembering exactly which sequence produced
> the lastval and checking its permissions ...
That is what the implementation does. Instead of remembering the last
value it rememebers the last sequence (and it contains the last value for
that sequence).
The very reason for doing that in the first place was to mimic currval()
as much as possible wrt rights and existence of the sequence.
--
/Dennis Björklund