Boszormenyi Zoltan schrieb:
> Thomas Guettler írta:
>> Hi,
>>
>> how can you get N numbers (without holes) from a sequence?
> # create sequence tmp_seq cache 1000;
Hi,
"alter SEQUENCE ... cache 100" survives a rollback. That's something I like to
avoid:
foo_esg_modw=# select * from foo_isu_isu_id_seq; begin; alter SEQUENCE
foo_isu_isu_id_seq cache 100; rollback; select *
from foo_isu_isu_id_seq;
sequence_name | last_value | increment_by | max_value |
min_value | cache_value | log_cnt |
is_cycled | is_called
------------------------+------------+--------------+---------------------+-----------+-------------+---------+-----------+-----------
foo_isu_isu_id_seq | 90508740 | 1 | 9223372036854775807 |
1 | 1 | 6 | f | t
BEGIN
ALTER SEQUENCE
ROLLBACK
sequence_name | last_value | increment_by | max_value |
min_value | cache_value | log_cnt |
is_cycled | is_called
------------------------+------------+--------------+---------------------+-----------+-------------+---------+-----------+-----------
foo_isu_isu_id_seq | 90508740 | 1 | 9223372036854775807 |
1 | 100 | 6 | f | t
--
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de
--
Sent via pgsql-general mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general