From: | "Hiroshi Saito" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp> |
---|---|
To: | "Eric P(dot) Melbardis" <eric(dot)melbardis(at)netkitsolutions(dot)com> |
Cc: | <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #4274: uuid returns duplicate values |
Date: | 2008-07-01 23:55:43 |
Message-ID: | 001a01c8dbd5$fc0126b0$9f086cdb@IBMC9A0F63B40D |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Hi.
Umm...
The test of my box is comfortable.
--
-- ossp-uuid test
--
CREATE OR REPLACE FUNCTION test_uuid(gen INTEGER)
RETURNS VOID AS $$
BEGIN
FOR i IN 1..$1 LOOP
RAISE INFO 'uuid = %', uuid_generate_v4();
END LOOP;
END;
$$
LANGUAGE 'plpgsql';
postgres=# CREATE OR REPLACE FUNCTION test_uuid(gen INTEGER)
postgres-# RETURNS VOID AS $$
postgres$# BEGIN
postgres$# FOR i IN 1..$1 LOOP
postgres$# RAISE INFO 'uuid = %', uuid_generate_v4();
postgres$# END LOOP;
postgres$# END;
postgres$# $$
postgres-# LANGUAGE 'plpgsql';
CREATE FUNCTION
postgres=# SELECT test_uuid(10);
INFO: uuid = 427c6f3e-9876-48c5-b44d-776771f7c2c9
INFO: uuid = fbab93a8-44d2-4f52-b6ae-01396c6ee17e
INFO: uuid = d82be630-d2e8-4662-b6ea-db8c56121024
INFO: uuid = 33689404-2da8-4a8d-9b94-6aeb284be347
INFO: uuid = cd7d10b7-23fa-40df-af74-53314dae235c
INFO: uuid = 80934b57-4cf4-4ab5-b915-f41f22054265
INFO: uuid = abd6f205-1a49-4f4f-b854-c7d611533401
INFO: uuid = 2dd64cbc-ee86-419e-ba09-ae538f60cc5a
INFO: uuid = 751ee0fe-d5ae-473f-b22f-e14c9066fadd
INFO: uuid = 0d36e47d-c065-4717-96f0-82f53f610a9a
test_uuid
-----------
(1 row)
Regards,
Hiroshi Saito
----- Original Message -----
From: "Eric P. Melbardis" <eric(dot)melbardis(at)netkitsolutions(dot)com>
Hi
I just tried it, slightly better but not a runner....
Here is a sample of the results I get when running my test script, note
result vary but lack of duplicates does not.
Why do you not use the CreateUUID function in windows??
Regards
Eric
------------------------ result ------------------------------------
psql:q.sql:152: NOTICE: uuid = dfde33d4-188a-4124-847d-0871a90be1fa
psql:q.sql:152: NOTICE: uuid = dfde33d4-188a-4124-847d-0871a90be1fa
psql:q.sql:152: NOTICE: uuid = e6e5dd64-5a1b-4f2e-8443-829d3b325247
psql:q.sql:152: NOTICE: uuid = 2bb08ab3-eb57-42a3-a9ac-63e466384d71
-----Original Message-----
From: Hiroshi Saito [mailto:z-saito(at)guitar(dot)ocn(dot)ne(dot)jp]
Sent: Sunday, June 29, 2008 3:22 PM
To: Eric P. Melbardis
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #4274: uuid returns duplicate values
Hi.
I'm sorry delaying release bugfix was not included in pg8.3.3.
Please try this.
http://winpg.jp/~saito/pg_work/OSSP_win32/
Regards,
Hiroshi Saito
>
>The following bug has been logged online:
>
>Bug reference: 4274
>Logged by: eric melbardis
>Email address: eric(dot)melbardis(at)netkitsolutions(dot)com
>PostgreSQL version: 8.3.3
>Operating system: windows xp sp3
>Description: uuid returns duplicate values
>Details:
>
>the uuid functions do not return unique values if used sequntially, or
i
>believe without too much tme in between invocations.
>
>the following test functions returns the same value!
>
>------------ test function ---------------
>create or replace function test_uuid()
>returns varchar as
>$body$
>begin
> raise notice 'uuid = %', uuid_generate_v4();
> raise notice 'uuid = %', uuid_generate_v4();
> raise notice 'uuid = %', uuid_generate_v4();
> raise notice 'uuid = %', uuid_generate_v4();
>end;
>$body$
>language 'plpgsql' ;
>
>--
>Sent via pgsql-bugs mailing list (pgsql-bugs(at)postgresql(dot)org)
>To make changes to your subscription:
>http://www.postgresql.org/mailpref/pgsql-bugs
From | Date | Subject | |
---|---|---|---|
Next Message | Eric P. Melbardis | 2008-07-02 00:24:32 | Re: BUG #4274: uuid returns duplicate values |
Previous Message | toruvinn | 2008-07-01 20:15:08 | Re: problema con pg_dum |