Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oO15V-0006B4-LD for pgsql-bugs@arkaria.postgresql.org; Tue, 16 Aug 2022 18:14:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oO15U-00075U-7e for pgsql-bugs@arkaria.postgresql.org; Tue, 16 Aug 2022 18:14:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oO15T-00075K-VO for pgsql-bugs@lists.postgresql.org; Tue, 16 Aug 2022 18:14:47 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oO15R-00046q-Ga for pgsql-bugs@lists.postgresql.org; Tue, 16 Aug 2022 18:14:47 +0000 Received: from bruce by momjian.us with local (Exim 4.94.2) (envelope-from ) id 1oO15N-00EgF5-2y; Tue, 16 Aug 2022 14:14:41 -0400 Date: Tue, 16 Aug 2022 14:14:41 -0400 From: Bruce Momjian To: Andreas Dijkman Cc: Tom Lane , "pgsql-bugs@lists.postgresql.org" Subject: Re: BUG #17349: Function gen_random_uuid duplicates in pgcrypto and core Message-ID: References: <17349-24d61e214429e8c1@postgresql.org> <1905059.1640713316@sss.pgh.pa.us> <046A362C-31BC-4C40-ACE5-B71B65EA541A@cygnis.nl> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="uiownUptLK/UO1hL" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <046A362C-31BC-4C40-ACE5-B71B65EA541A@cygnis.nl> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --uiownUptLK/UO1hL Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 https://momjian.us EDB https://enterprisedb.com Indecision is a decision. Inaction is an action. Mark Batterson --uiownUptLK/UO1hL Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="pgcrypto.diff" diff --git a/doc/src/sgml/pgcrypto.sgml b/doc/src/sgml/pgcrypto.sgml index 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 - Returns a version 4 (random) UUID. (Obsolete, this function is now also - included in core PostgreSQL.) + Returns a version 4 (random) UUID. (Obsolete, this function + internally calls the core function of the same name.) --uiownUptLK/UO1hL--