{"Entry":{"collection":"sql","key":"alter-large-object","name":"ALTER LARGE OBJECT","aliases":["alterlargeobject"],"metadata":{"aliases":["alterlargeobject"],"changed_in":["9.5","14"],"changes":[{"from":"8.4","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":[],"removed":[]},"status":"added","synopsis":null,"to":"9.0"},{"from":"9.3","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description"],"removed":[]},"status":"changed","synopsis":null,"to":"9.4"},{"from":"9.4","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":[],"removed":[]},"status":"changed","synopsis":{"added":["ALTER LARGE OBJECT large_object_oid OWNER TO { new_owner | CURRENT_USER | SESSION_USER }"],"removed":[]},"to":"9.5"},{"from":"9.5","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["see_also"],"removed":[]},"status":"changed","synopsis":null,"to":"9.6"},{"from":"9.6","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["see_also"],"removed":[]},"status":"changed","synopsis":null,"to":"10"},{"from":"10","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["see_also"],"removed":[]},"status":"changed","synopsis":null,"to":"11"},{"from":"11","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["see_also"],"removed":[]},"status":"changed","synopsis":null,"to":"12"},{"from":"13","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["see_also"],"removed":[]},"status":"changed","synopsis":{"added":["ALTER LARGE OBJECT large_object_oid OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }"],"removed":[]},"to":"14"},{"from":"15","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description"],"removed":[]},"status":"changed","synopsis":null,"to":"16"},{"from":"16","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["see_also"],"removed":[]},"status":"changed","synopsis":null,"to":"17"}],"content_hash":"f901b3ebd116e80b691140dd3b378d5b12429b1b3367cfb41bb93f110a84c369","editorial":{},"first_version":"9.0","group":"misc","imported_at":"2026-09-27T17:57:27.470177+08:00","last_version":"20","name":"ALTER LARGE OBJECT","object":"LARGE OBJECT","position":16002,"present_in":["9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"purpose":"change the definition of a large object","purpose_zh":"","related":[],"slug":"alter-large-object","source_rev":"b7bd9cda","synopsis":"ALTER LARGE OBJECT large_object_oid OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }","verb":"ALTER"}},"Definition":{"Collection":"sql","Key":"alter-large-object","SourceDatabase":"center","Version":"18","SourceTable":"sqlcmd","SourceKey":"alter-large-object","SourceRevision":"b7bd9cda","Facts":{"anchor":"SQL-ALTERLARGEOBJECT","file":"sql-alterlargeobject.html","lang":"en","name":"ALTER LARGE OBJECT","purpose":"change the definition of a large object","purpose_zh":"","related":[],"sections":[{"html":"\u003cp\u003e\u003ccode class=\"command\"\u003eALTER LARGE OBJECT\u003c/code\u003e changes the definition of a large object.\u003c/p\u003e\u003cp\u003eYou must own the large object to use \u003ccode class=\"command\"\u003eALTER LARGE OBJECT\u003c/code\u003e. To alter the owner, you must also be able to \u003ccode class=\"literal\"\u003eSET ROLE\u003c/code\u003e to the new owning role. (However, a superuser can alter any large object anyway.) Currently, the only functionality is to assign a new owner, so both restrictions always apply.\u003c/p\u003e","key":"description","title":"Description"},{"html":"\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003elarge_object_oid\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eOID of the large object to be altered\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_owner\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe new owner of the large object\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e","key":"parameters","title":"Parameters"},{"html":"\u003cp\u003eThere is no \u003ccode class=\"command\"\u003eALTER LARGE OBJECT\u003c/code\u003e statement in the SQL standard.\u003c/p\u003e","key":"compatibility","title":"Compatibility"},{"html":"\u003cspan class=\"simplelist\"\u003e\u003ca href=\"/docs/18/largeobjects.html\" title=\"Chapter 33. Large Objects\"\u003eChapter 33\u003c/a\u003e\u003c/span\u003e","key":"see_also","title":"See Also"}],"sections_same_as":"","slug":"18","synopsis_html":"ALTER LARGE OBJECT \u003cem class=\"replaceable\"\u003e\u003ccode\u003elarge_object_oid\u003c/code\u003e\u003c/em\u003e OWNER TO { \u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_owner\u003c/code\u003e\u003c/em\u003e | CURRENT_ROLE | CURRENT_USER | SESSION_USER }","synopsis_text":"ALTER LARGE OBJECT large_object_oid OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }"},"ManualEvidence":{},"MeasuredEvidence":{}},"Text":{"Collection":"sql","Key":"alter-large-object","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"ALTER LARGE OBJECT","Summary":"更改一个大对象的定义","BodyHTML":"\u003cpre\u003eALTER LARGE OBJECT large_object_oid OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\u003c/pre\u003e\u003csection\u003e\u003ch2\u003e描述\u003c/h2\u003e\u003cp\u003e\u003ccode\u003eALTER LARGE OBJECT\u003c/code\u003e更改一个大对象的定义。\u003c/p\u003e\u003cp\u003e要使用\u003ccode\u003eALTER LARGE OBJECT\u003c/code\u003e，你必须是该大对象的拥有者。要修改其拥有者，你还必须能够对新的拥有者角色执行\u003ccode\u003eSET ROLE\u003c/code\u003e。（不过，超级用户无论如何都可以修改任何大对象。）当前唯一提供的功能是指定新的拥有者，因此这两项限制始终都适用。\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e参数\u003c/h2\u003e\u003cdiv\u003e\u003cdl\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003elarge_object_oid\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e要修改的大对象的 OID\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003enew_owner\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e该大对象的新拥有者\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e兼容性\u003c/h2\u003e\u003cp\u003eSQL 标准中没有\u003ccode\u003eALTER LARGE OBJECT\u003c/code\u003e语句。\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e另见\u003c/h2\u003e\u003cspan\u003e\u003ca href=\"/docs/18/largeobjects.html\" rel=\"nofollow\"\u003e第 33 章\u003c/a\u003e\u003c/span\u003e\u003c/section\u003e","SourceRevision":"ca936764","ContentHash":"87b3134affaa8049c0cecfe2f13448f5cbd18428390a452467a8c15aae771660","Payload":{"purpose_zh":"更改一个大对象的定义","sections":[{"html":"\u003cp\u003e\u003ccode class=\"command\"\u003eALTER LARGE OBJECT\u003c/code\u003e更改一个大对象的定义。\u003c/p\u003e\u003cp\u003e要使用\u003ccode class=\"command\"\u003eALTER LARGE OBJECT\u003c/code\u003e，你必须是该大对象的拥有者。要修改其拥有者，你还必须能够对新的拥有者角色执行\u003ccode class=\"literal\"\u003eSET ROLE\u003c/code\u003e。（不过，超级用户无论如何都可以修改任何大对象。）当前唯一提供的功能是指定新的拥有者，因此这两项限制始终都适用。\u003c/p\u003e","key":"description","title":"描述"},{"html":"\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003elarge_object_oid\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e要修改的大对象的 OID\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_owner\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e该大对象的新拥有者\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e","key":"parameters","title":"参数"},{"html":"\u003cp\u003eSQL 标准中没有\u003ccode class=\"command\"\u003eALTER LARGE OBJECT\u003c/code\u003e语句。\u003c/p\u003e","key":"compatibility","title":"兼容性"},{"html":"\u003cspan class=\"simplelist\"\u003e\u003ca href=\"/docs/18/largeobjects.html\" title=\"第 33 章 大对象\"\u003e第 33 章\u003c/a\u003e\u003c/span\u003e","key":"see_also","title":"另见"}],"sections_same_as":"","synopsis_html":"ALTER LARGE OBJECT \u003cem class=\"replaceable\"\u003e\u003ccode\u003elarge_object_oid\u003c/code\u003e\u003c/em\u003e OWNER TO { \u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_owner\u003c/code\u003e\u003c/em\u003e | CURRENT_ROLE | CURRENT_USER | SESSION_USER }","synopsis_text":"ALTER LARGE OBJECT large_object_oid OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
