Re: TODO item: Have psql show current values for a sequence

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: "Dickson S(dot) Guedes" <guediz(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: TODO item: Have psql show current values for a sequence
Date: 2008-07-15 03:17:28
Message-ID: 200807150317.m6F3HSd06034@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


Wow. I adjusted the patch slightly and applied it; the updated version
is attached. We have been waiting for this to be done for quite some
time. Thanks.

---------------------------------------------------------------------------

Dickson S. Guedes wrote:
> Hi all,
>
> These patch implements the TODO item: Have psql show current values
> for a sequence.
> Comments are welcome.
>
> * Credits
>
> The original patch were developed by Euler Taveira de Oliveira
> <euler(at)timbira(dot)com>
> but how he is a little busy, he sends it to me and I made some changes
> to satisfy
> the TODO item above.
>
> * Discussions
>
> http://archives.postgresql.org/pgsql-hackers/2007-12/msg00102.php
> http://archives.postgresql.org/pgsql-hackers/2007-12/msg00605.php
>
> * Outputs
>
> # \d foo_bar_seq
> Sequence "public.foo_bar_seq"
> +---------------+---------+---------------------+
> | Column | Type | Value |
> +---------------+---------+---------------------+
> | sequence_name | name | foo_bar_seq |
> | last_value | bigint | 11 |
> | start_value | bigint | 1 |
> | increment_by | bigint | 1 |
> | max_value | bigint | 9223372036854775807 |
> | min_value | bigint | 1 |
> | cache_value | bigint | 1 |
> | log_cnt | bigint | 31 |
> | is_cycled | boolean | f |
> | is_called | boolean | t |
> +---------------+---------+---------------------+
>
> # \d+ foo_bar_seq
> Sequence "public.foo_bar_seq"
> +---------------+---------+---------------------+-------------+
> | Column | Type | Value | Description |
> +---------------+---------+---------------------+-------------+
> | sequence_name | name | foo_bar_seq | |
> | last_value | bigint | 11 | |
> | start_value | bigint | 1 | |
> | increment_by | bigint | 1 | |
> | max_value | bigint | 9223372036854775807 | |
> | min_value | bigint | 1 | |
> | cache_value | bigint | 1 | |
> | log_cnt | bigint | 31 | |
> | is_cycled | boolean | f | |
> | is_called | boolean | t | |
> +---------------+---------+---------------------+-------------+
>
> --
> []s
> Dickson S. Guedes
> --------------------------------------
> Projeto Colmeia - Curitiba - PR
> +55 (41) 3254-7130 ramal: 27
> http://makeall.wordpress.com/
> http://pgcon.postgresql.org.br/
> http://planeta.postgresql.org.br/

[ Attachment, skipping... ]

>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

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

Attachment Content-Type Size
/rtmp/diff text/x-diff 3.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2008-07-15 03:35:59 Re: DROP ROLE dependency tracking ...
Previous Message Andrej Ricnik-Bay 2008-07-15 00:13:21 Re: Postgres-R source code release

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2008-07-15 04:51:31 Re: [PATCHES] WIP: executor_hook for pg_stat_statements
Previous Message Bruce Momjian 2008-07-14 23:11:55 Re: \d+ should display the storage options for columns