Skip site navigation (1) Skip section navigation (2)

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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Euler Taveira de Oliveira <euler(at)timbira(dot)com>
Cc: Dhanaraj M <Dhanaraj(dot)M(at)Sun(dot)COM>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: current version: Patch - Have psql show current values
Date: 2006-05-06 03:56:06
Message-ID: 200605060356.k463u6N21224@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
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 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
> increment_by  | 1
> max_value     | 9223372036854775807
> min_value     | 1
> cache_value   | 1
> log_cnt       | 1
> is_cycled     | f
> is_called     | f
> 
> 
> Because "\d abc" doesn't show us any important information.
> 
> regression=# \d abc
>    Sequence "public.abc"
>      Column     |  Type
> ---------------+---------
>   sequence_name | name
>   last_value    | bigint
>   increment_by  | bigint
>   max_value     | bigint
>   min_value     | bigint
>   cache_value   | bigint
>   log_cnt       | bigint
>   is_cycled     | boolean
>   is_called     | boolean
> 
> 
> Last year, I made a patch for this but it was so ugly that I didn't send 
>   to -patches. Maybe Bruce's solution (\x & select * from seq) could be 
> hardcoded in describe.c.
> 
> -- 
>    Euler Taveira de Oliveira
>    http://www.timbira.com/
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
> 
>                http://www.postgresql.org/docs/faq
> 

-- 
  Bruce Momjian   http://candle.pha.pa.us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

In response to

Responses

pgsql-hackers by date

Next:From: Hannu KrosingDate: 2006-05-06 08:17:31
Subject: Re: Transactions per second
Previous:From: Euler Taveira de OliveiraDate: 2006-05-06 03:50:25
Subject: Re: current version: Patch - Have psql show current values

pgsql-patches by date

Next:From: Jaime CasanovaDate: 2006-05-06 05:22:07
Subject: Re: fori stmt with by keyword was:(Re: [HACKERS] for statement, adding a STEP clause?)
Previous:From: Euler Taveira de OliveiraDate: 2006-05-06 03:50:25
Subject: Re: current version: Patch - Have psql show current values

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group