Re: current version: Patch - Have psql show current values
От | Dhanaraj M |
---|---|
Тема | Re: current version: Patch - Have psql show current values |
Дата | |
Msg-id | 4459A560.6020206@sun.com обсуждение исходный текст |
Ответ на | Re: current version: Patch - Have psql show current values for a sequence] (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: current version: Patch - Have psql show current values
|
Список | 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 по дате отправления: