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

From: Mohamed Akram <mohd(dot)akram(at)outlook(dot)com>
To: "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 21:54:00
Message-ID: 48023522-741C-4239-A908-3153C00DF35D@outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

That’s true, I guess it’s more of an enhancement but I couldn’t 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.

I know I can convert to base64, but I’d rather not.

On May 25, 2017, at 1:26 AM, David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com<mailto:david(dot)g(dot)johnston(at)gmail(dot)com>> wrote:

On Wed, May 24, 2017 at 1:46 PM, <mohd(dot)akram(at)live(dot)com<mailto:mohd(dot)akram(at)live(dot)com>> wrote:
The following bug has been logged on the website:

Bug reference: 14670
Logged by: Mohamed Akram
Email address: mohd(dot)akram(at)live(dot)com<mailto:mohd(dot)akram(at)live(dot)com>
PostgreSQL version: 9.6.3
Operating system: macOS 10.12.5
Description:

As per RFC 4122 - https://tools.ietf.org/html/rfc4122#section-4.3 - name
should not be limited to textual data.

​Since it says should and not must an implementation that restricts the name to be textual is still conforming.

Apart from that supplying an SQL example of what you want to work and what happens when it fails would reduce the possibility of mis-understanding what it is you are saying.​

David J.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2017-05-24 22:48:33 Re: BUG #14670: uuid_generate_v3 and uuid_generate_v5 do not support binary names
Previous Message David G. Johnston 2017-05-24 21:26:54 Re: BUG #14670: uuid_generate_v3 and uuid_generate_v5 do not support binary names