Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org> writes:
> Here is a small patch that implements a function lastval() that
> works just like currval() except that it give the current
> value of the last sequence used by nextval().
Why is that a good idea? In a complex application it'd be awfully easy
to break logic that depends on such a thing.
regards, tom lane