]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Mark uuid-to-bytea cast as leakproof.
authorMasahiko Sawada <msawada@postgresql.org>
Thu, 25 Jun 2026 21:25:57 +0000 (14:25 -0700)
committerMasahiko Sawada <msawada@postgresql.org>
Thu, 25 Jun 2026 21:25:57 +0000 (14:25 -0700)
The uuid-to-bytea cast just serializes a valid uuid datum into its
fixed 16-byte representation. It does not have an input-dependent
error path so mark its pg_proc entry as leakproof.

Oversight in commit ba21f5bf8a.

Bump catalog version.

Author: Chao Li <lic@highgo.com>
Discussion: https://postgr.es/m/1FAAF426-9205-4F53-8D3B-F2003D96EC37@gmail.com

src/include/catalog/catversion.h
src/include/catalog/pg_proc.dat
src/test/regress/expected/opr_sanity.out

index 04eb2af2ac870c62d03c2748db6a14502221a819..2fe3be9ada58cf8fba7a23ab155244d9ae60f450 100644 (file)
@@ -57,6 +57,6 @@
  */
 
 /*                                                     yyyymmddN */
-#define CATALOG_VERSION_NO     202606232
+#define CATALOG_VERSION_NO     202606251
 
 #endif
index fa76c7923f0c38cdbf4dd019c88adf42aa8da6f2..384ba908d35bc29e2ddd723a33e1e8372f20be1d 100644 (file)
   prosrc => 'bytea_int8' },
 
 { oid => '6510', descr => 'convert uuid to bytea',
-  proname => 'bytea', prorettype => 'bytea', proargtypes => 'uuid',
-  prosrc => 'uuid_bytea' },
+  proname => 'bytea', proleakproof => 't', prorettype => 'bytea',
+  proargtypes => 'uuid', prosrc => 'uuid_bytea' },
 { oid => '6511', descr => 'convert bytea to uuid',
   proname => 'uuid', prorettype => 'uuid', proargtypes => 'bytea',
   prosrc => 'bytea_uuid' },
index 80400a337347333f3b284db07a876be4bbc7c738..9f5a954da92399c2fc6c04e5a7bb45db87609d42 100644 (file)
@@ -887,6 +887,7 @@ oid8le(oid8,oid8)
 oid8gt(oid8,oid8)
 oid8ge(oid8,oid8)
 btoid8cmp(oid8,oid8)
+bytea(uuid)
 tid_block(tid)
 tid_offset(tid)
 -- Check that functions without argument are not marked as leakproof.