From: Bruce Momjian <bruce@momjian.us>
To: Andreas Dijkman <andreas.dijkman@cygnis.nl>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #17349: Function gen_random_uuid duplicates in pgcrypto and core
Date: Tue, 16 Aug 2022 14:14:41 -0400
Message-ID: <YvvekfZ7/UD2r6+Y@momjian.us> (raw)
In-Reply-To: <046A362C-31BC-4C40-ACE5-B71B65EA541A@cygnis.nl>
References: <17349-24d61e214429e8c1@postgresql.org>
<1905059.1640713316@sss.pgh.pa.us>
<046A362C-31BC-4C40-ACE5-B71B65EA541A@cygnis.nl>
On Tue, Dec 28, 2021 at 08:36:22PM +0000, Andreas Dijkman wrote:
> Thanks for pointing me to the discussion. I’ve read the thread and would
> suggest applying the doc-note, that’s in the last part of that discussion:
>
>
> Small doc tweak suggestion - the pgcrypto docs [1] now say about
> gen_random_uuid():
>
> Returns a version 4 (random) UUID. (Obsolete, this function is now also
> included in core PostgreSQL.)
>
> which gives the impression the code contains two versions of this function,
> the core
> one and an obsolete one in pgcrypto. Per the commit message the situation
> is actually:
>
> The pgcrypto implementation now internally redirects to the built-in one.
>
> That would have avoided this bug-report I guess, as the documentation would
> reflect the actual situation better.
I have written the attached patch to clarify this.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com
Indecision is a decision. Inaction is an action. Mark Batterson
Attachments:pgcrypto.diff (text/x-diff, 576B) downloaddiff --git a/doc/src/sgml/pgcrypto.sgml b/doc/src/sgml/pgcrypto.sgmlindex 79759654a7..08172b7f84 100644--- a/doc/src/sgml/pgcrypto.sgml+++ b/doc/src/sgml/pgcrypto.sgml@@ -1143,8 +1143,8 @@ gen_random_bytes(count integer) returns bytea
gen_random_uuid() returns uuid
</synopsis>
<para>
- Returns a version 4 (random) UUID. (Obsolete, this function is now also- included in core <productname>PostgreSQL</productname>.)+ Returns a version 4 (random) UUID. (Obsolete, this function+ internally calls the core function of the same name.)
</para>
</sect2>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: bruce@momjian.us, andreas.dijkman@cygnis.nl, tgl@sss.pgh.pa.us, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17349: Function gen_random_uuid duplicates in pgcrypto and core
In-Reply-To: <YvvekfZ7/UD2r6+Y@momjian.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox