Re: timestamp precision
От | A Gilmore |
---|---|
Тема | Re: timestamp precision |
Дата | |
Msg-id | 4145CB3E.4040208@shaw.ca обсуждение исходный текст |
Ответ на | Re: timestamp precision (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-novice |
Tom Lane wrote: > Michael Glaesemann <grzm@myrealbox.com> writes: > >>On Sep 13, 2004, at 4:19 PM, A Gilmore wrote: >> >>>Im using the default precision for my timestamps, 6. Is it safe to >>>declare this column unique? > > >>If you are assuming it's unique because of the high precision, well, >>you might get lucky, and you might not. (Some might even argue that >>it's for all intents and purposes unique). > > > I think what he's wondering is whether every two transactions will get > distinguishable values of now(), so that putting a UNIQUE constraint on > timestamps inserted by distinct transactions could never fail. > > I think this is an unsafe assumption, because: > Yeah, thats what I was meaning. I didn't think it would work (by work, I mean no chance of failure due to duplicate) but was hoping to be suprised. Thank you for the insight. A Gilmore
В списке pgsql-novice по дате отправления: