July 30th, 2008 by depesz | Tags: , , , | 1 comment »
Did it help? If yes - maybe you can help me? Donate BTC to 19zPa5diT2LZqGtTi8f8bfApLn8rw9zBHx

On 15th of July, Bruce Momjian commited patch written by Dickson S. Guedes, which:

Have psql \d show the value of sequence columns.

before it, output of \d of sequence was like this:

# \d some_sequence
Sequence "public.some_sequence"
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

but now, with this patch, output looks like this:

# \d some_sequence
Sequence "public.some_sequence"
Column | Type | Value
---------------+---------+---------------------
sequence_name | name | testa_id_seq
last_value | bigint | 5
start_value | bigint | 1
increment_by | bigint | 1
max_value | bigint | 9223372036854775807
min_value | bigint | 1
cache_value | bigint | 1
log_cnt | bigint | 28
is_cycled | boolean | f
is_called | boolean | t

While all of this information was actually available before with simple:

select * from public.some_sequence

it's nice to have it available in a easier way.

  1. One comment

  2. # William Araujo
    Aug 1, 2008

    I think that this output must be under \d+ command… [good enhancement]

Leave a comment