From: Masahiko Sawada Date: Thu, 25 Jun 2026 21:25:57 +0000 (-0700) Subject: Mark uuid-to-bytea cast as leakproof. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6468f7a853c3c75066410cfb54ecdb3050ec7132;p=thirdparty%2Fpostgresql.git Mark uuid-to-bytea cast as leakproof. 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 Discussion: https://postgr.es/m/1FAAF426-9205-4F53-8D3B-F2003D96EC37@gmail.com --- diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index 04eb2af2ac8..2fe3be9ada5 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -57,6 +57,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 202606232 +#define CATALOG_VERSION_NO 202606251 #endif diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat index fa76c7923f0..384ba908d35 100644 --- a/src/include/catalog/pg_proc.dat +++ b/src/include/catalog/pg_proc.dat @@ -1209,8 +1209,8 @@ 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' }, diff --git a/src/test/regress/expected/opr_sanity.out b/src/test/regress/expected/opr_sanity.out index 80400a33734..9f5a954da92 100644 --- a/src/test/regress/expected/opr_sanity.out +++ b/src/test/regress/expected/opr_sanity.out @@ -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.