Dhanaraj M <Dhanaraj.M@Sun.COM> writes:
> However, it was not possible to display the seq. value using this.
> Hence, I made a small change in the currval() function, so that it
> retrieves the last_value
> even if the the value is not cached.
Breaking currval()'s semantics is not an acceptable solution for this.
The best, fully backward compatible solution is for psql to issue
"SELECT last_value FROM <seq>" queries to get the values. This might
be a bit tricky to wedge into the structure of describe.c, but I don't
see any fundamental reason why it can't be done.
regards, tom lane