Re: Changing sequence cache

Поиск
Список
Период
Сортировка
От Dan Langille
Тема Re: Changing sequence cache
Дата
Msg-id 200203041832.g24IW2k78903@lists.unixathome.org
обсуждение исходный текст
Ответ на Changing sequence cache  (Matthew Price <pricem@juno.com>)
Список pgsql-sql
On 4 Mar 2002 at 18:02, Matthew Price wrote:

> I already have a sequence named customers_custid_seq
> 
> I would like to increase the cache setting some.  How can i alter the cache
> after the sequence has already been created?
> 
> Trying:
> update customer_custid_seq set cache=5;
> Gives this:
> ERROR:  You can't change sequence relation customer_custid_seq

test=# create sequence mprice;
CREATE

test=# select nextval('mprice');nextval
---------      1
(1 row)

test=# select setval('mprice', 23);setval
--------    23
(1 row)

test=# select nextval('mprice');nextval
---------     24
(1 row)

test=#
-- 
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/ - practical examples



В списке pgsql-sql по дате отправления:

Предыдущее
От: Matthew Price
Дата:
Сообщение: Changing sequence cache
Следующее
От: Tom Lane
Дата:
Сообщение: Uniqueness of rule, constraint, and trigger names