catching up an id sequence

Поиск
Список
Период
Сортировка
От Austin Swinney
Тема catching up an id sequence
Дата
Msg-id 53BA885A-E1A5-11D8-B954-000A95B2A15E@interactivate.com
обсуждение исходный текст
Ответы Re: catching up an id sequence  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
Hi most esteemed novices and experts.  It is an honor to post here!

I imported a MySQL dump into PostgreSQL (7.4.3) and was wondering what
a good way to catch up the ID sequence table to be current with the
table I imported.

In the Perl app associated with the DB, I swapped out currval for
mysql_insertid.  Then I noticed that the currval reported is started
from 0,  but there are already 1400+ records in that table that have id
numbers.

The definition in question is:

  messageid        | integer                     | not null default
nextval('public.message_messageid_seq'::text)

Ideas?  Many thanks!

Austin


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

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: trying to run a query
Следующее
От: Tom Lane
Дата:
Сообщение: Re: catching up an id sequence