Ask a Question related to PostgreSQL / PGSQL, Design and Development.
-
sid tow #1
Re: Problem with the sequence
Thanks that should help but what about the rest of the columns can u explain what is "is_cycled" and "cache_value". Thanks in advance.
Richard Huxton <dev@archonet.com> wrote:sid tow wrote:From psql:> HI
>
> I have a problem locating the documentation for "sequence". I want to get the detailed information about the columns present in a sequence table ie when I do
>
> psql=# select * from foo_seq;
> sequence_name | last_value | increment_by | max_value | min_value | cache_value | log_cnt | is_cycled | is_called
> ---------------------------+------------+--------------+---------------------+-----------+-------------+---------+-----------+-----------
> foo_seq | 11 | 1 | 9223372036854775807 | 1 | 1 | 0 | f | t
> (1 row)
>
> I need to know where do i find documentation to know what the columns specify and I have already checked the man pages of create_sequence where I did not find much.
> Can somebody give me ref to a link where I get such information.
\d foo_seq
Sequence "public.foo_seq"
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
From the manuals:
CREATE [ TEMPORARY | TEMP ] SEQUENCE name [ INCREMENT [ BY ] increment ]
[ MINVALUE minvalue | NO MINVALUE ] [ MAXVALUE maxvalue | NO MAXVALUE ]
[ START [ WITH ] start ] [ CACHE cache ] [ [ NO ] CYCLE ]
For the ones not mentioned in the manual:
last_value - is the last value given out by the sequence
is_called - says whether nextval() has been called in this session
(and so whether it is safe to call currval())
log_cnt - don't know, googling suggests it's to do with WAL logging.
Does that help?
--
Richard Huxton
Archonet Ltd
---------------------------------
Do you Yahoo!?
Yahoo! Search presents - Jib Jab's 'Second Term'
sid tow Guest
-
Gap Sequence
I have a problam , is anybody have idea about it? Is any module there which can find and print gap sequence? thanks -
Problem with Oracle sequence
I defined an Oracle sequence, which is used in my application to generate unique increasing numbers. I set it from 1 with increment also 1,... -
Problem with Autogenerated sequence
Hi, I have a problem with the SEQUENCE generation. I have a column in a table which auto increments by 1 every time there is a entry and I am... -
Multi row sequence?
Hi, I just started looking into PostgreSQL (coming from Mysql before), but have a question: Is it possible to have a sequence (as a multirow... -
Import Sequence problem <<<<<TRY @, any MM support here?>>>>>>
Still have this incredibly annoying problem. Director MX, XP, Ram=2 mb, new P4 etc... I CAN drag the images from a desktop folder into the Cast...



Reply With Quote

