Re: BUG #4167: When generating UUID using UUID-OSSP module, UUIDs are not unique on Windows

From: "Hiroshi Saito" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>
To: ismael(dot)ciordia(at)openbravo(dot)com
Cc: rse(at)engelschall(dot)com, paolo(dot)juvara(at)openbravo(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4167: When generating UUID using UUID-OSSP module, UUIDs are not unique on Windows
Date: 2008-11-14 23:15:44
Message-ID: 20081115081544.z0000.z-saito@guitar.ocn.ne.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi.

Sorry,very late reaction...

Thanks!, It's a good information.:-)
and,CC to Ralf-san.

Regards,
Hiroshi Saito

>Hi Hiroshi-san,
>
>we have run our test in the next environments:
>-Windows XP + PostgreSql 8.3.5
>-Ubunto + PostgreSql 8.3.3
>
>In both cases the test was successful, so we have closed the topic.
>
>Thanks a lot for your support, PostgreSql is an incredible database.
>
>Kind regards,
>
>Ismael
>
>-----Mensaje original-----
>De: Hiroshi Saito [mailto:z-saito(at)guitar(dot)ocn(dot)ne(dot)jp]
>Enviado el: mi駻coles, 12 de noviembre de 2008 17:15
>Para: pgsql-bugs(at)postgresql(dot)org
>CC: Ismael Ciordia, Openbravo
>Asunto: Re: [BUGS] BUG #4167: When generating UUID using UUID-OSSP
>module, UUIDs are not unique on Windows
>
>
>Ooops, It will be helpful to a user.
>Therefore, it transmits here.:-)
>Thanks!!
>
>-- copy --
>Hi Hiroshi-san,
>
>if you want you can include the function we have used to test the problem,
>pasted below.
>
>Regards,
>
>Ismael
>
>**************
>
>CREATE OR REPLACE FUNCTION test_uuidgen(countmax INTEGER) RETURNS character
>varying AS
>$BODY$
>DECLARE
> countmin INTEGER := 1;
> distinctuuid bigint;
> v_message VARCHAR(2000) := '';
>
>BEGIN
> drop table if exists uuid_gen;
> CREATE TABLE uuid_gen
> (
> uuid_gen_col uuid NOT NULL
>
> );
> LOOP
> INSERT INTO uuid_gen (uuid_gen_col) VALUES (uuid_generate_v1());
> countmin := countmin + 1;
> EXIT WHEN countmin > countmax;
> END LOOP;
> SELECT COUNT(DISTINCT uuid_gen_col) INTO distinctuuid FROM uuid_gen;
> IF distinctuuid <> countmax THEN
> v_message := 'Repeated UUID: FAILS';
> ELSE
> v_message := 'NO repeated UUID: OK';
> END IF;
> RETURN v_message;
>END;
>$BODY$ LANGUAGE 'plpgsql';

Browse pgsql-bugs by date

  From Date Subject
Next Message Rod Taylor 2008-11-16 16:30:05 BUG #4533: Plpgsql complex type failure
Previous Message Rainer Bauer 2008-11-14 11:20:21 Re: BUG #4529: lc_messages in config ignored