Re: current version: Patch - Have psql show current values - Mailing list pgsql-patches

From Tom Lane
Subject Re: current version: Patch - Have psql show current values
Date
Msg-id 10921.1147182961@sss.pgh.pa.us
Whole thread Raw
In response to Re: current version: Patch - Have psql show current values  (Dhanaraj M <Dhanaraj.M@Sun.COM>)
Responses Re: Patch - Have psql show current values  (Dhanaraj M <Dhanaraj.M@Sun.COM>)
List pgsql-patches
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

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Cleaning up multiply-defined-symbol warnings on OS X
Next
From: "Hiroshi Saito"
Date:
Subject: Encryption of .pgpass