Re: Serial data type not starting at 1

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Serial data type not starting at 1
Дата
Msg-id 20011115065900.B7025-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Serial data type not starting at 1  (Tielman J de Villiers <tjdevil@bondnet.co.za>)
Список pgsql-general
On Thu, 15 Nov 2001, Tielman J de Villiers wrote:

> Hi,
>
> I hope someone can help me.
>
> I want to create a new table using the "automatic" sequence function of
> Postgres by creating the first column as type "serial". But I want to start
> at say "5000". Can it be done, and how?

I would think you can use setval() on the sequence created by the serial
before any rows are inserted in order to start at a different value.



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

Предыдущее
От: Tielman J de Villiers
Дата:
Сообщение: Re: Serial data type not starting at 1
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Serial data type not starting at 1