pgsql: Deduplicate code in LargeObjectExists and myLargeObjectExists. - Mailing list pgsql-committers

From Fujii Masao
Subject pgsql: Deduplicate code in LargeObjectExists and myLargeObjectExists.
Date
Msg-id E1sojMH-000kKi-LS@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Deduplicate code in LargeObjectExists and myLargeObjectExists.

myLargeObjectExists() and LargeObjectExists() had nearly identical code,
except for handling snapshots. This commit renames myLargeObjectExists()
to LargeObjectExistsWithSnapshot() and refactors LargeObjectExists()
to call it internally, reducing duplication.

Author: Yugo Nagata
Reviewed-by: Fujii Masao
Discussion: https://postgr.es/m/20240702163444.ab586f6075e502eb84f11b1a@sranhm.sraoss.co.jp

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/412229d197f894a01c163b9e9fdfec1a1855f7ab

Modified Files
--------------
src/backend/catalog/pg_largeobject.c       | 13 +++++++---
src/backend/storage/large_object/inv_api.c | 40 +-----------------------------
src/include/catalog/pg_largeobject.h       |  2 ++
3 files changed, 13 insertions(+), 42 deletions(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: Remove hardcoded hash opclass function signature exceptions
Next
From: Tom Lane
Date:
Subject: pgsql: Make jsonpath .string() be immutable for datetimes.