Re: [ADMIN] how to alter sequence.
От | Joel Burton |
---|---|
Тема | Re: [ADMIN] how to alter sequence. |
Дата | |
Msg-id | 20021204174450.GA17010@temp.joelburton.com обсуждение исходный текст |
Ответ на | Re: [ADMIN] how to alter sequence. (Dustin Sallings <dustin@spy.net>) |
Ответы |
Re: [ADMIN] how to alter sequence.
|
Список | pgsql-hackers |
On Wed, Dec 04, 2002 at 09:33:52AM -0800, Dustin Sallings wrote: > Around 20:41 on Dec 4, 2002, Hannu Krosing said: > > What's wrong with this: > > dustin=# create sequence test_seq; > CREATE SEQUENCE > dustin=# select nextval('test_seq'); > nextval > --------- > 1 > (1 row) > > dustin=# select setval('test_seq', 9999); > setval > -------- > 9999 > (1 row) > > dustin=# select nextval('test_seq'); > nextval > --------- > 10000 > (1 row) Dustin -- The thread here is about how to raise the *max* value for the sequence, not how to set the current value higher. The sequence in question was created with a too-low maximum value (see help on CREATE SEQUENCE for options); the user now wants to raise it. - J. -- Joel BURTON | joel@joelburton.com | joelburton.com | aim: wjoelburton Independent Knowledge Management Consultant
В списке pgsql-hackers по дате отправления: