hello,
I'd like to know if there is any possible solution to allocate arbitrary number of *subsequent values* from a sequence.
I mean it in the following way:
ie.: The sequence 'seq' is at 1234 for the current ...
=#select nextval('seq');
nextval
-------
1234
and I need 5 five subsequent values (from 1234 to 1238), - in other words - a range with a length of 5 from the current
value.I thought this simple trick could do the job :
=#select setval('seq', (select nextval('seq')) + 5);
My question:
is it good if 'seq' can be used concurrently by multiple backends, or is there any other point from that it can be
dangerous/ harmful?
Papp Gyozo
- pgerzson@freestart.hu