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: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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-06-20 13:57:13
Message-ID: B52469FF-8C94-4037-972E-AC63A7BA27A2@outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I’ve attached a patch for this.

Regards,
Mohamed

> On May 25, 2017, at 2:48 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Mohamed Akram <mohd(dot)akram(at)outlook(dot)com> writes:
>> 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.
>
> 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

Attachment Content-Type Size
uuid-bytea.diff application/octet-stream 7.5 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruno Wolff III 2017-06-21 00:42:37 Beta 10 parser error for CREATE STATISTICS IF NOT EXISTS
Previous Message Chapman Flack 2017-06-19 21:31:59 Re: [BUGS] Re: Postgresql bug report - unexpected behavior of suppress_redundant_updates_trigger