Deduplicate code in LargeObjectExists and myLargeObjectExists.
authorFujii Masao <fujii@postgresql.org>
Thu, 12 Sep 2024 12:45:42 +0000 (21:45 +0900)
committerFujii Masao <fujii@postgresql.org>
Thu, 12 Sep 2024 12:45:42 +0000 (21:45 +0900)
commit412229d197f894a01c163b9e9fdfec1a1855f7ab
tree076fe66d6b93aaf9ed8ce5c66a9b3342054abd2f
parent23d0b48468b8971b35d713754f7d5ecf54e5f78f
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
src/backend/catalog/pg_largeobject.c
src/backend/storage/large_object/inv_api.c
src/include/catalog/pg_largeobject.h