Re: Question about uuid_generate_v3

From: Godofredo Contreras <gcontreras(at)infraestructuragis(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Question about uuid_generate_v3
Date: 2011-07-23 17:17:08
Message-ID: 4E2B0214.7070501@infraestructuragis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you Adrian for clarifying this. I will use uuid_generate_v1 or
uuid_generate_v4 instead of uuid_generate_v3.

Regards
Godofredo Contreras
El 23/07/2011 11:31 a.m., Adrian Klaver escribió:
> On Saturday, July 23, 2011 8:39:52 am Godofredo Contreras wrote:
>> Hi,
>>
>> First of all, I am new to this list and I'm not sure if it is the
>> correct one to post technical questions. If it is not please tell me
>> which one I should use.
>>
>> Recently I installed postgresql 9.1beta3 on a Windows 7 machine to start
>> testing uuid generation. I correctly installed the functions in my
>> public schema, however when I run the following sql sentence SELECT
>> uuid_generate_v3(uuid_ns_url(), 'http://www.cit.com') I always get the
>> same result "b2c61380-d1b2-3ca8-a63b-c45d4e0da06a".
>>
>> Not sure if this is a bug or if I am doing something wrong or if I
>> missunderstood that uuid_generate_v3 should be generating differente
>> uuids in every different call to the function.
>>
>> Has someone faced the same problem? in case of yes could you please
>> share your solution with me?
> From the docs http://www.postgresql.org/docs/9.0/interactive/uuid-ossp.html:
>
> "The name parameter will be MD5-hashed, so the cleartext cannot be derived from
> the generated UUID. The generation of UUIDs by this method has no random or
> environment-dependent element and is therefore reproducible. "
>
> You might want to look at one of the other functions listed at the above page.
>
>> Thank you
>> Godofredo Contreras

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tomas Vondra 2011-07-23 17:55:08 Re: streaming replication does not work across datacenter with 20ms latency?
Previous Message Marc Munro 2011-07-23 16:57:26 Re: [GENERAL] Dropping extensions