question on serial key

Поиск
Список
Период
Сортировка
Искать
От
Brandon Metcalf
Тема
question on serial key
Дата
в 10:41:51
Msg-id
Pine.LNX.4.58L.0905220831390.8880@cedar.geronimoalloys.com
Список
Дерево обсуждения
question on serial key Brandon Metcalf <brandon@geronimoalloys.com>
Re: question on serial key Sam Mason <sam@samason.me.uk>
Re: question on serial key Grzegorz Jaśkiewicz <gryzman@gmail.com>
Re: question on serial key Brandon Metcalf <brandon@geronimoalloys.com>
Re: question on serial key Scott Marlowe <scott.marlowe@gmail.com>
Re: question on serial key Grzegorz Jaśkiewicz <gryzman@gmail.com>
Re: question on serial key Brandon Metcalf <brandon@geronimoalloys.com>
Re: question on serial key Grzegorz Jaśkiewicz <gryzman@gmail.com>
Re: question on serial key "Roderick A. Anderson" <raanders@cyber-office.net>
Re: question on serial key Grzegorz Jaśkiewicz <gryzman@gmail.com>
This may be better discussed in the pgsql-sql forum.  Please let me
know if so.

I am looking for criteria on deciding whether or not to use a serial
(auto-incrementing) key for rows in a table.  For example, if I have a
table of, say, the elements on the periodic table I could use the
atomic number as a unique key which would not be a serial type.
Another example is where I'm inserting lots of rows in a given period
of time and I need to go back and select the max id of one of these
rows; I would need a serial key in this case.

Intuitively, it's pretty clear to me when a serial index is called
for.  Is there a succinct set of guidelines that one could go by?

Thanks.

-- 
Brandon
В списке pgsql-general по дате отправления
От: Alban Hertroys
Дата:
От: Grzegorz Jaśkiewicz
Дата:
Сообщение: Re: question on serial key
FAQ