Re: renumber table

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: renumber table
Дата
Msg-id dcc563d10806181453q779b9a02oa5f16d10d87d9260@mail.gmail.com
обсуждение исходный текст
Ответ на Re: renumber table  (Steve Clark <sclark@netwolves.com>)
Ответы Re: renumber table  (Steve Clark <sclark@netwolves.com>)
Список pgsql-general
On Wed, Jun 18, 2008 at 3:50 PM, Steve Clark <sclark@netwolves.com> wrote:
>
> I realize this is certainly not the best design - but at this point in time
> it can't be changed. The table
> is rarely updated and never concurrently and is very small, typically less
> than 100 rows so there really is
> no performance impact.

Then the easiest way to renumber a table like that is to do something like:

create temp sequence myseq;
update table set idfield=nextval('myseq');

and hit enter.
and pray.  :)

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

Предыдущее
От: Steve Clark
Дата:
Сообщение: Re: renumber table
Следующее
От: "Dave Lee"
Дата:
Сообщение: Re: migrating from mysql: need to convert empty string to null