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

From Dhanaraj M
Subject Re: current version: Patch - Have psql show current values
Date
Msg-id 4459A560.6020206@sun.com
Whole thread Raw
In response to Re: current version: Patch - Have psql show current values for a sequence]  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: current version: Patch - Have psql show current values  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
Tom Lane wrote:

>Dhanaraj M <Dhanaraj.M@Sun.COM> writes:
>
>
>>sorry for sending the old version in the previous mail . Here I attach
>>the recent version of the patch file.
>>
>>
>----------------------------------------------------------------------
>
>
     Surely this problem does not require adding any server-side code.

>Something like "select last_value from <seq>" would be more appropriate;
>and it'd have some hope of working with back-version servers.
>
>Also, please use something more helpful than "***" as the column
>header.  Your urge to add a footnote to explain it shows that you
>didn't try hard enough to devise a good header to begin with.
>
>[ btw, both fmgroids.h and fmgrtab.c are generated files.  Patching
>them is unnecessary and inappropriate. ]
>
----------------------------------------------------------

The existing functions like lastval, currval dont provide the current
sequence value always.
They work only if the sequence is already cached (nextval is called
atleast once for that sequence).
Changing the internals of lastval/currval will give the solution.
However, I feel that the functionality change
may affect the customers who use the current version.

Hence, I am sure that it requires the server side change. There are two
options here
1. Modifying the exisitng functions  (or) 2. adding new functions


Thanks for your review
Dhanaraj



pgsql-patches by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Page at a time index scan
Next
From: "Neil Conway"
Date:
Subject: Re: plpython tracebacks