Обсуждение: serial field starting at specific value

Поиск
Список
Период
Сортировка

serial field starting at specific value

От
Robert Mosher
Дата:
Is there a way I can specify which value a serial field starts at? I
would like to have it start at some arbitrary value, say 10, or 100, so
that no element in a table has a key lower than that.

Thanks,
Rob Mosher

Re: serial field starting at specific value

От
Tom Lane
Дата:
Robert Mosher <mosher@andrews.edu> writes:
> Is there a way I can specify which value a serial field starts at?

Use setval() on the sequence created for the serial column.

            regards, tom lane