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

Поиск
Список
Период
Сортировка
От Hiroshi Saito
Тема Re: BUG #4167: When generating UUID using UUID-OSSP module, UUIDs are not unique on Windows
Дата
Msg-id 4B314E2E6F004CDA902B1F3B8A34F33F@HIRO57887DE653
обсуждение исходный текст
Ответ на Re: BUG #4167: When generating UUID using UUID-OSSP module, UUIDs are not unique on Windows  ("Hiroshi Saito" <z-saito@guitar.ocn.ne.jp>)
Список pgsql-bugs
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';

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #4523: TO_CHAR function : the ".US" format returns incorrect value
Следующее
От: "chris wood"
Дата:
Сообщение: BUG #4525: substring with this pattern works in 8.3.1; does not work in 8.3.4