Re: timestamp precision

From: A Gilmore <agilmore(at)shaw(dot)ca>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: timestamp precision
Date: 2004-09-13 16:30:54
Message-ID: 4145CB3E.4040208@shaw.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Tom Lane wrote:
> Michael Glaesemann <grzm(at)myrealbox(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Greg Donald 2004-09-13 18:59:31 nextval() clarification
Previous Message Betsy Barker 2004-09-13 15:16:58 LockAcquire: lock table 1 is out of memory