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

2006-08-23 Thread Dhanaraj M
Hi all, This patch was discussed a few months ago. I could not complete this patch at that time. I hope that the current version of my patch is acceptable. Patch details: ** 1. Assign a new field called 'Seq Value' for \ds command 2. All the sequence values are '1' initially 3. After

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 so

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-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 n

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 incr

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

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

2006-05-03 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 " would be more appropriate; and it'd ha

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

2006-05-03 Thread Dhanaraj M
--- Begin Message --- sorry for sending the old version in the previous mail . Here I attach the recent version of the patch file. Dhanaraj M wrote: I saw the following in the TODO list. clients-psql 1. Have psql show current values for a sequence Hence, this patch displays the

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

2006-05-02 Thread Dhanaraj M
I saw the following in the TODO list. clients-psql 1. Have psql show current values for a sequence Hence, this patch displays the current seq. value in a separate column when \ds is executed. I attach the patch here. The display format may have to be changed. I would like to chan