Re: timestamp as primary key? - Mailing list pgsql-general

From Tomasz Ostrowski
Subject Re: timestamp as primary key?
Date
Msg-id 20061019112713.GA12073@batory.org.pl
Whole thread Raw
In response to timestamp as primary key?  ("Joe Kramer" <cckramer@gmail.com>)
Responses Re: timestamp as primary key?  ("John D. Burger" <john@mitre.org>)
List pgsql-general
On Thu, 19 Oct 2006, Joe Kramer wrote:

> Question: is it okay to use timestamp as primary key, or there is
> possibility of collision? (Meaning two processes may INSERT into table
> within same millisecond.) It is a web application.

If your insert fail you can always try again after some random short
time. Just do that several times and if it fails, say, 5 times
show an error to a user (sugest him to try a lottery - he'll surely
win ;-) ).

Regards
Tometzky
--
...although Eating Honey was a very good thing to do, there was a
moment just before you began to eat it which was better than when you
were...
                                                      Winnie the Pooh

pgsql-general by date:

Previous
From: "Joe Kramer"
Date:
Subject: timestamp as primary key?
Next
From: "Peter Bauer"
Date:
Subject: Overload after some minutes, please help!