Обсуждение: Re: [GENERAL] Advise on primary key for detail tables (OS: Raspberry Pi)

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

Re: [GENERAL] Advise on primary key for detail tables (OS: Raspberry Pi)

От
Scott Marlowe
Дата:
On Thu, Apr 6, 2017 at 4:27 AM, Ertan Küçükoğlu
<ertan.kucukoglu@1nar.com.tr> wrote:
> Sorry for top posting.
>
> I have a serial in master table because I need to know data insertion order.
> DateTime on Raspberry Pi is not accurate due to power loss and lack of
> internet access to fetch correct time from.

Note that serial / sequences do NOT guarantee exact order of
insertion. It's quite possible to have a few switched here and there.
It gets you an approximate order of insertion but a few values could
get swapped around depending on timing of your application and how you
do inserts. Just an FYI.