Search Postgresql Archives

Re: GUID for postgreSQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Jul 27, 2005, at 5:00 PM, Scott Marlowe wrote:

Then I would think a better thought out solution would be one where your
unique ids ARE guaranteed to be unique, where you used something like

select 'astringuniqtothismachine'||nextval('localsequence');

That really would be guaranteed unique as long as you set up each
machine to have a string unique to it.


I have implemented this type of approach in distributed systems. The problem is users who make a copy of their database, continue to use both copies, and then call you when they try to merge things together. I would say user opportunity to mess this up is way more likely than having a GUID collision.

I'm not saying that GUIDs are the ultimate solution to this problem. The original poster brought up the need to store GUIDs in a database. There are protocols and standards that require GUIDs and I merely agree it would be nice to have a GUID data type.



John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux