Re: current version: Patch - Have psql show current values

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dhanaraj M <Dhanaraj(dot)M(at)Sun(dot)COM>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: current version: Patch - Have psql show current values
Date: 2006-05-09 13:56:01
Message-ID: 10921.1147182961@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Dhanaraj M <Dhanaraj(dot)M(at)Sun(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2006-05-09 15:00:29 Re: [HACKERS] Big IN() clauses etc : feature proposal
Previous Message Tom Lane 2006-05-09 13:31:56 Re: Big IN() clauses etc : feature proposal

Browse pgsql-patches by date

  From Date Subject
Next Message Hiroshi Saito 2006-05-09 14:46:24 Encryption of .pgpass
Previous Message Tom Lane 2006-05-09 13:18:17 Re: Cleaning up multiply-defined-symbol warnings on OS X