{"Entry":{"collection":"role","key":"pg_execute_server_program","name":"pg_execute_server_program","aliases":[],"metadata":{"aliases":[],"category":"Server files and programs","content_hash":"92d2d8d272fc216417a4d76606df0eb59e311538754370148e0e226c50b19e16","derived_content_hash":"eb11062707e06c8957b9030e7ce4b88485c5385cc29ac512a4620bbee10c622a","imported_at":"2026-09-27T17:57:59.047234+08:00","name":"pg_execute_server_program","name_zh":"pg_execute_server_program","repair_provenance":{"original_source_revision":"","receipt_sha256":"fd42278a049b808de71da0d1634069feb484e41597e8f9b1b8a77efb00ea107a","repair":"wiki-repair-20261023"},"slug":"pg_execute_server_program","source_rev":"wiki-repair-20261023:d55695e960e515e4e3c7dd5a86b2d967c965e3958193daee0768a9d0be1a8259","summary":"pg_execute_server_program allows executing programs on the database server as the user the database runs as using COPY and other functions which allow executing a server-side program."}},"Definition":{"Collection":"role","Key":"pg_execute_server_program","SourceDatabase":"center","Version":"18","SourceTable":"predefined_role","SourceKey":"pg_execute_server_program","SourceRevision":"b7ebd726e6017f55081b4034b96d6a3289ae7937a26adaf72e58b9a08e009c75","Facts":{"description":["pg_execute_server_program allows executing programs on the database server as the user the database runs as using COPY and other functions which allow executing a server-side program."],"description_zh":"这些角色旨在让管理员能够使受信任但非超级用户的角色能够以数据库运行所用操作系统用户的身份访问文件并在数据库服务器上运行程序。它们在直接访问文件时会绕过所有数据库级权限检查，并且可被用来获得超级用户级别的访问能力。因此，向用户授予这些角色时必须极其谨慎。","description_zh_html":"\u003cp\u003e\n       这些角色旨在让管理员能够使受信任但非超级用户的角色能够以数据库运行所用操作系统用户的身份访问文件并在数据库服务器上运行程序。它们在直接访问文件时会绕过所有数据库级权限检查，并且可被用来获得超级用户级别的访问能力。因此，向用户授予这些角色时必须极其谨慎。\n      \u003c/p\u003e\u003cp\u003e\n\u003ccode class=\"literal\"\u003epg_execute_server_program\u003c/code\u003e 允许使用 \u003ccode class=\"command\"\u003eCOPY\u003c/code\u003e 和其他允许执行服务器端程序的函数，以数据库运行所用用户的身份在数据库服务器上执行程序。\n      \u003c/p\u003e","facts":[{"label":"Name","value":"pg_execute_server_program"},{"label":"Manual terminology","value":"Predefined roles"}],"related":[],"release":{"channel":"stable","label":"18.6","major":"18","ref":"PostgreSQL 18.6 Documentation","revision":"b7ebd726e6017f55081b4034b96d6a3289ae7937a26adaf72e58b9a08e009c75"},"sections":[{"paragraphs":["These roles are intended to allow administrators to have trusted, but non-superuser, roles which are able to access files and run programs on the database server as the user the database runs as. They bypass all database-level permission checks when accessing files directly and they could be used to gain superuser-level access. Therefore, great care should be taken when granting these roles to users."],"title":"Privileges and scope"}],"sources":[{"label":"PostgreSQL 18.6 Documentation","sha256":"b7ebd726e6017f55081b4034b96d6a3289ae7937a26adaf72e58b9a08e009c75","url":"/docs/18/predefined-roles.html#PREDEFINED-ROLE-PG-READ-SERVER-FILES"},{"label":"PostgreSQL 18 online manual","url":"https://www.postgresql.org/docs/18/predefined-roles.html#PREDEFINED-ROLE-PG-READ-SERVER-FILES"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/predefined-roles.html","sha256":"99e1fbd83b1da2cf9da5823238b31d78c953c6118ecc61939808d2bf32f9b56d"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-pgdoc"},"ManualEvidence":{"release":{"channel":"stable","label":"18.6","major":"18","ref":"PostgreSQL 18.6 Documentation","revision":"b7ebd726e6017f55081b4034b96d6a3289ae7937a26adaf72e58b9a08e009c75"},"sources":[{"label":"PostgreSQL 18.6 Documentation","sha256":"b7ebd726e6017f55081b4034b96d6a3289ae7937a26adaf72e58b9a08e009c75","url":"/docs/18/predefined-roles.html#PREDEFINED-ROLE-PG-READ-SERVER-FILES"},{"label":"PostgreSQL 18 online manual","url":"https://www.postgresql.org/docs/18/predefined-roles.html#PREDEFINED-ROLE-PG-READ-SERVER-FILES"}]},"MeasuredEvidence":{}},"Text":{"Collection":"role","Key":"pg_execute_server_program","SourceDatabase":"center","Version":"18","Locale":"en","Title":"pg_execute_server_program","Summary":"pg_execute_server_program allows executing programs on the database server as the user the database runs as using COPY and other functions which allow executing a server-side program.","BodyHTML":"\u003cp\u003epg_execute_server_program allows executing programs on the database server as the user the database runs as using COPY and other functions which allow executing a server-side program.\u003c/p\u003e","SourceRevision":"b7ebd726e6017f55081b4034b96d6a3289ae7937a26adaf72e58b9a08e009c75","ContentHash":"56e487a72960a511409cd7632cfefb237236e1c79e7516abb2ee25476f19376c","Payload":{"description":["pg_execute_server_program allows executing programs on the database server as the user the database runs as using COPY and other functions which allow executing a server-side program."],"related":[],"sections":[{"paragraphs":["These roles are intended to allow administrators to have trusted, but non-superuser, roles which are able to access files and run programs on the database server as the user the database runs as. They bypass all database-level permission checks when accessing files directly and they could be used to gain superuser-level access. Therefore, great care should be taken when granting these roles to users."],"title":"Privileges and scope"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["11","12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
