Re: Auto incrementing primary keys

Поиск
Список
Период
Сортировка
От Raymond O'Donnell
Тема Re: Auto incrementing primary keys
Дата
Msg-id 47B9C468.7070605@iol.ie
обсуждение исходный текст
Ответ на Re: Auto incrementing primary keys  (pgsql_user <amaltasb@gmail.com>)
Ответы Re: Auto incrementing primary keys
Re: Auto incrementing primary keys
Список pgsql-general
On 18/02/2008 13:14, pgsql_user wrote:
> so wouldnt I run out of ids one day, if there are lot of failed insert
> statements, lets say for every successful insert there are 50
> unsuccessful inserts, so ids would be 1, 50, 100, and once I have
> thousands of rows, I will run out of IDs ? should I use bigserial
> instead ?

Well, that depends on your usage, so only you can answer that. According
to the docs, "serial" creates an integer column,  which will give you
2147483647 values - how quickly will you use that lot up? If you think
you will run out, by all means use bigserial.

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------

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

Предыдущее
От: Erik Jones
Дата:
Сообщение: Re: questions about very large table and partitioning
Следующее
От: David Fetter
Дата:
Сообщение: Re: Initdb failed in PostgreSQL 7.3.21