Re: Problems with sequences

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Problems with sequences
Дата
Msg-id 20060907124926.GN10093@svana.org
обсуждение исходный текст
Ответ на Re: Problems with sequences  (Arturo Perez <aperez@hayesinc.com>)
Ответы Re: Problems with sequences  (Alban Hertroys <alban@magproductions.nl>)
Список pgsql-general
On Thu, Sep 07, 2006 at 07:15:43AM -0400, Arturo Perez wrote:
> Note that all of the above was in an attempt to reset the sequence to
> the proper value.  I'm beginning to think that it's a library problem
> as this morning I get:
>
> iht=> select max(article_id) from article;
> max
> ------
> 4992
> (1 row)
>
> iht=> select nextval('pk_article');
> nextval
> ---------
>     4986
> (1 row)
>
> Assuming the sequence number is being used correctly why would they
> be 6 apart?

The last four transactions could be rolled back, or not committed yet.

I'd suggest looking at your insert statements. If the actual inserts
are insterting actual numbers, look very very carefully where the numbers
are coming from.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

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

Предыдущее
От: Ray Stell
Дата:
Сообщение: Re: archives is not working was (Re: [NOVICE] Removing duplicate keys)
Следующее
От: "Merlin Moncure"
Дата:
Сообщение: Re: Problems with sequences