Re: timestamp precision - Mailing list pgsql-novice

From A Gilmore
Subject Re: timestamp precision
Date
Msg-id 4145CB3E.4040208@shaw.ca
Whole thread Raw
In response to Re: timestamp precision  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: LockAcquire: lock table 1 is out of memory
Next
From: Greg Donald
Date:
Subject: nextval() clarification