Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0afa288

Browse files
committed
Remove unnecessary code from be_lo_put()
A permission check is performed in be_lo_put() just after returningfrom inv_open(), but the permission is already checked in inv_open(),so we can remove the second check.This check was added in8d98819, but then the refactoring inae20b23 should have removed it.Author: Yugo NAGATA <nagata@sraoss.co.jp>Discussion:https://www.postgresql.org/message-id/flat/20240424185932.9789628b99a49ec81b020425%40sraoss.co.jp
1 parentaa79bde commit0afa288

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

‎src/backend/libpq/be-fsstubs.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -859,18 +859,6 @@ be_lo_put(PG_FUNCTION_ARGS)
859859

860860
lo_cleanup_needed= true;
861861
loDesc=inv_open(loOid,INV_WRITE,CurrentMemoryContext);
862-
863-
/* Permission check */
864-
if (!lo_compat_privileges&&
865-
pg_largeobject_aclcheck_snapshot(loDesc->id,
866-
GetUserId(),
867-
ACL_UPDATE,
868-
loDesc->snapshot)!=ACLCHECK_OK)
869-
ereport(ERROR,
870-
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
871-
errmsg("permission denied for large object %u",
872-
loDesc->id)));
873-
874862
inv_seek(loDesc,offset,SEEK_SET);
875863
written=inv_write(loDesc,VARDATA_ANY(str),VARSIZE_ANY_EXHDR(str));
876864
Assert(written==VARSIZE_ANY_EXHDR(str));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp