Sequence (related) Problem

Поиск
Список
Период
Сортировка
От Ron St.Pierre
Тема Sequence (related) Problem
Дата
Msg-id OXaF9.119079$ka.2812272@news1.calgary.shaw.ca
обсуждение исходный текст
Ответы Re: Sequence (related) Problem  (Neil Conway <neilc@samurai.com>)
Список pgsql-general
I am migrating a DB from Access to postgreSQL and am making quite a few
changes to it including renaming tables, columns, sequences, etc.

I am renaming TBLOLD to TBLNEW and consequently need to rename the
sequence from TBLOLD_ID_SEQ to TBLNEW_ID_SEQ. I also want it to START at
a value just above TBLOLD's last value. To set the start value of the
new sequence I am trying:

     CREATE SEQUENCE 'tblnew_id_seq' start nextval('tblold_id_deq')
increment 1 maxvalue 2147483647 minvalue 1  cache 1 ;
as well as many variations of the above (including using SELECT to get
the nextval).

Could someone please point me to a solution?

Thanks

--
Ron St.Pierre
Syscor R&D
tel: 250-361-1681
email: rstpierre@syscor.com



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

Предыдущее
От: Jon Swinth
Дата:
Сообщение: Re: Two features left
Следующее
От: Jean-Luc Lachance
Дата:
Сообщение: Re: Two features left