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().
What do people think of this idea? (Tom seems opposed, I'm just wondering if there are other opinions out there.)
I like the concept, but I haven't looked at the code -- I'd be happy to review the implementation, although I won't waste my time if most people are opposed to the idea itself.
-Neil
---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings