Re: STARTING SERIAL / BIGSERIAL FIELDS FROM 1.

Поиск
Список
Период
Сортировка
От Jure Kobal
Тема Re: STARTING SERIAL / BIGSERIAL FIELDS FROM 1.
Дата
Msg-id 200907202110.00779.jure.kobal@gmx.com
обсуждение исходный текст
Ответ на STARTING SERIAL / BIGSERIAL FIELDS FROM 1.  (JORGE MALDONADO <jorgemal1960@gmail.com>)
Список pgsql-novice
The info for the serial is stored in a seperate table which name should be
something like <table_name>_<column_name>_seq where table_name is the name of
the table and column_name the name of the serial you're using.
It should look something like

 sequence_name | last_value | increment_by | ...
-------------------+------------+---------------+ ...
    album_seq     |        461   |            1      | ...

you would need to change the last_value column.

Regards
Jure


On Monday 20 of July 2009 20:54:33 JORGE MALDONADO wrote:
> How can a serial or bigserial field start from 1 again?
> I need to manually remove all the records from a table and I need these
> kind of fields to start from 1 once again.
>
> With respect,
> Jorge Maldonado

Вложения

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

Предыдущее
От: Mike
Дата:
Сообщение: Re: How to insert data from a text file
Следующее
От: "tgs"
Дата:
Сообщение: Re: trouble connecting to DB