Re: BUG #14670: uuid_generate_v3 and uuid_generate_v5 do not support binary names

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mohamed Akram <mohd(dot)akram(at)outlook(dot)com>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14670: uuid_generate_v3 and uuid_generate_v5 do not support binary names
Date: 2017-05-24 22:48:33
Message-ID: 15138.1495666113@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Mohamed Akram <mohd(dot)akram(at)outlook(dot)com> writes:
> Thats true, I guess its more of an enhancement but I couldnt find an option for that in the bug form. However, even the sample C code in the RFC takes a void* argument for name.
> My use case is generating unique identifiers for images, similar to:
> select uuid_generate_v5(namespace, data);
> where data is a bytea column.

A little experimentation suggests that we might be able to add a function
uuid_generate_v3(uuid, bytea) alongside the uuid_generate_v3(uuid, text)
one without creating serious problems --- in ambiguous situations, it
seems the text one would be preferred, so we'd not break existing queries.

I have no interest in preparing such a patch myself, though.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2017-05-25 14:15:58 Re: BUG #14637: Tests fail with pl_PL.UTF-8 locale
Previous Message Mohamed Akram 2017-05-24 21:54:00 Re: BUG #14670: uuid_generate_v3 and uuid_generate_v5 do not support binary names