Re: bug in setval?

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: bug in setval?
Дата
Msg-id 50057.80.177.99.193.1047548904.squirrel@ssl.vale-housing.co.uk
обсуждение исходный текст
Ответ на bug in setval?  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Список pgsql-hackers
It's rumoured that Christopher Kings-Lynne once said:
> When I create a new table with a serial column, the first row defaults
> to inserting '1'.
>
> If I delete all the rows from the table and want to reset the sequence,
> I can't:
>
> ERROR:  users_health_types_type_id_seq.setval: value 0 is out of bounds
> (1,9223372036854775807)
>
> How do I set the sequence to have next value = 1?  Surely the bounds
> should begin at zero?

That's bugged me for ages as well. I just never got round to asking about
it...
Regards, Dave.




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

Предыдущее
От: Mike Mascari
Дата:
Сообщение: Re: Roadmap for FE/BE protocol redesign
Следующее
От: "Dave Page"
Дата:
Сообщение: Re: Roadmap for FE/BE protocol redesign