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';