Re: current version: [PATCHES] Patch - Have psql show current values

2006-05-09 Thread Dhanaraj M
Bruce Momjian wrote: I am thinking we just add another column to the \d display for sequences showing the current value. --- As suggested in the previous mails, I tried to use the following to display the seq. value.

Re: current version: [PATCHES] Patch - Have psql show current values

2006-05-09 Thread Tom Lane
Dhanaraj M [EMAIL PROTECTED] 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

Re: current version: [PATCHES] Patch - Have psql show current values

2006-05-05 Thread Bruce Momjian
As Tom asked, why not use seqname.last_value? Looking at your output: + if (showSeq !showTables) + appendPQExpBuffer(buf, + ,\n curval(c.oid) as \%s\ + ,\n CASE curvalcheck(c.oid) WHEN '1' THEN '%s' WHEN '0' THEN

Re: current version: [PATCHES] Patch - Have psql show current values

2006-05-05 Thread Euler Taveira de Oliveira
Bruce Momjian wrote: What fields do we want to show? Maybe the TODO item is not needed. Is this all we want to show? IRC what we want is something like this. regression=# \d abc Sequence public.abc Column| Type --+- sequence_name | abc last_value| 1

Re: current version: [PATCHES] Patch - Have psql show current values

2006-05-05 Thread Bruce Momjian
I am thinking we just add another column to the \d display for sequences showing the current value. --- Euler Taveira de Oliveira wrote: Bruce Momjian wrote: What fields do we want to show? Maybe the TODO item is not

Re: current version: [PATCHES] Patch - Have psql show current values

2006-05-04 Thread Dhanaraj M
Tom Lane wrote: Dhanaraj M [EMAIL PROTECTED] 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

Re: current version: [PATCHES] Patch - Have psql show current values for a sequence]

2006-05-03 Thread Tom Lane
Dhanaraj M [EMAIL PROTECTED] 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