Thread: pgsql: Deduplicate code in LargeObjectExists and myLargeObjectExists.

pgsql: Deduplicate code in LargeObjectExists and myLargeObjectExists.

From
Fujii Masao
Date:
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(-)