{"Entry":{"collection":"func","key":"set-config","name":"set_config","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"7.2","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"7.3"},{"descriptions_changed":true,"doc_overhaul":false,"from":"7.3","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"7.4"},{"descriptions_changed":false,"doc_overhaul":false,"from":"7.4","group_changed":{"from":"misc","to":"admin"},"signatures":{"added":[],"removed":[]},"status":"changed","to":"8.0"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"}],"content_hash":"4c08bcae55da4ddbc11d99cf64a22b9ea5fa53743b67e591b70cbbeb107b5d5b","derived_content_hash":"b102e7b195913c07f4079868cbd3cf4fb44e0119034ab7d2425cf5b8606760a5","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:a788160642ba150adb677fc7df7015de42438d8eb2a5875f97a81b495e0d38f8","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"first_version":"7.3","group":"admin","group_label":"System Administration Functions","groups":["misc","admin"],"imported_at":"2026-09-27T17:57:29.727578+08:00","last_version":"20","name":"set_config","name_key":"set_config","position":29123,"present_in":["7.3","7.4","8.0","8.1","8.2","8.3","8.4","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"],"repair_provenance":{"original_source_revision":"wiki-repair-20261023:471f82d321d2b552324f88cb1cd2f93c09c3b871b3dbc06d2d3f63f8b4606e88","receipt_sha256":"a7fa2afe23963da6f7029fd8d0d378cb6e358e3a1684b83981c580f63c72cee7","repair":"wiki-repair-20261023"},"signature":"set_config ( setting_name text, new_value text, is_local boolean ) → text","signature_count":1,"slug":"set-config","source_rev":"wiki-repair-20261023:a788160642ba150adb677fc7df7015de42438d8eb2a5875f97a81b495e0d38f8","summary":"Sets the parameter setting_name to new_value, and returns that value.","summary_zh":""}},"Definition":{"Collection":"func","Key":"set-config","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"set-config","SourceRevision":"wiki-repair-20261023:a788160642ba150adb677fc7df7015de42438d8eb2a5875f97a81b495e0d38f8","Facts":{"description":"Sets the parameter setting_name to new_value, and returns that value. If is_local is true, the new value will only apply during the current transaction. If you want the new value to apply for the rest of the current session, use false instead. This function corresponds to the SQL command SET.","description_html":"Sets the parameter \u003cem class=\"parameter\"\u003e\u003ccode\u003esetting_name\u003c/code\u003e\u003c/em\u003e to \u003cem class=\"parameter\"\u003e\u003ccode\u003enew_value\u003c/code\u003e\u003c/em\u003e, and returns that value. If \u003cem class=\"parameter\"\u003e\u003ccode\u003eis_local\u003c/code\u003e\u003c/em\u003e is \u003ccode class=\"literal\"\u003etrue\u003c/code\u003e, the new value will only apply during the current transaction. If you want the new value to apply for the rest of the current session, use \u003ccode class=\"literal\"\u003efalse\u003c/code\u003e instead. This function corresponds to the SQL command \u003ca href=\"/docs/18/sql-set.html\" title=\"SET\"\u003e\u003cspan class=\"refentrytitle\"\u003eSET\u003c/span\u003e\u003c/a\u003e.","description_zh":"将参数 setting_name 设置为 new_value，并返回该值。如果 is_local 为 true，新值仅在当前事务期间生效。如果希望新值在当前会话的剩余时间内生效，则使用 false。此函数对应 SQL 命令 SET。","description_zh_html":"将参数 \u003cem class=\"parameter\"\u003e\u003ccode\u003esetting_name\u003c/code\u003e\u003c/em\u003e 设置为 \u003cem class=\"parameter\"\u003e\u003ccode\u003enew_value\u003c/code\u003e\u003c/em\u003e，并返回该值。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003eis_local\u003c/code\u003e\u003c/em\u003e 为 \u003ccode class=\"literal\"\u003etrue\u003c/code\u003e，新值仅在当前事务期间生效。如果希望新值在当前会话的剩余时间内生效，则使用 \u003ccode class=\"literal\"\u003efalse\u003c/code\u003e。此函数对应 SQL 命令 \u003ca href=\"/docs/18/sql-set.html\" title=\"SET\"\u003e\u003cspan class=\"refentrytitle\"\u003eSET\u003c/span\u003e\u003c/a\u003e。","doc":{"anchor":"FUNCTIONS-ADMIN-SET-TABLE","file":"functions-admin.html","sha256":"885561d57facd49c33b44a50e320a002197d700d118784cc87d6410efadbd1f6","slug":"18"},"documentation_revision":{"inputs":[{"file":"functions-admin.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"885561d57facd49c33b44a50e320a002197d700d118784cc87d6410efadbd1f6","version":"18.7"},{"file":"functions-admin.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"830e894d29fec30b7c350c915fcaed4a63b24d57f2c96150bf25fa07fb43849c","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"group":"admin","group_label":"系统管理函数","lang":"en","layout":"table-new","pages":["functions-admin.html"],"prose_only":false,"signatures":[{"description":"Sets the parameter setting_name to new_value, and returns that value. If is_local is true, the new value will only apply during the current transaction. If you want the new value to apply for the rest of the current session, use false instead. This function corresponds to the SQL command SET.","description_html":"Sets the parameter \u003cem class=\"parameter\"\u003e\u003ccode\u003esetting_name\u003c/code\u003e\u003c/em\u003e to \u003cem class=\"parameter\"\u003e\u003ccode\u003enew_value\u003c/code\u003e\u003c/em\u003e, and returns that value. If \u003cem class=\"parameter\"\u003e\u003ccode\u003eis_local\u003c/code\u003e\u003c/em\u003e is \u003ccode class=\"literal\"\u003etrue\u003c/code\u003e, the new value will only apply during the current transaction. If you want the new value to apply for the rest of the current session, use \u003ccode class=\"literal\"\u003efalse\u003c/code\u003e instead. This function corresponds to the SQL command \u003ca href=\"/docs/18/sql-set.html\" title=\"SET\"\u003e\u003cspan class=\"refentrytitle\"\u003eSET\u003c/span\u003e\u003c/a\u003e.","description_zh":"将参数 setting_name 设置为 new_value，并返回该值。如果 is_local 为 true，新值仅在当前事务期间生效。如果希望新值在当前会话的剩余时间内生效，则使用 false。此函数对应 SQL 命令 SET。","description_zh_html":"将参数 \u003cem class=\"parameter\"\u003e\u003ccode\u003esetting_name\u003c/code\u003e\u003c/em\u003e 设置为 \u003cem class=\"parameter\"\u003e\u003ccode\u003enew_value\u003c/code\u003e\u003c/em\u003e，并返回该值。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003eis_local\u003c/code\u003e\u003c/em\u003e 为 \u003ccode class=\"literal\"\u003etrue\u003c/code\u003e，新值仅在当前事务期间生效。如果希望新值在当前会话的剩余时间内生效，则使用 \u003ccode class=\"literal\"\u003efalse\u003c/code\u003e。此函数对应 SQL 命令 \u003ca href=\"/docs/18/sql-set.html\" title=\"SET\"\u003e\u003cspan class=\"refentrytitle\"\u003eSET\u003c/span\u003e\u003c/a\u003e。","examples":[{"expr":"set_config('log_statement_stats', 'off', false)","result":"off"}],"html":"\u003ccode class=\"function\"\u003eset_config\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003esetting_name\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003enew_value\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003eis_local\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"set_config ( setting_name text, new_value text, is_local boolean ) → text","zh_from":"same-version-manual"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-admin.html","sha256":"b4fab9daceb7883fd75b32b6eb5398f2bbbfbbed5c83d1b2bf99cc8d842cdaf7"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-ADMIN-SET-TABLE","file":"functions-admin.html","sha256":"885561d57facd49c33b44a50e320a002197d700d118784cc87d6410efadbd1f6","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"set-config","SourceDatabase":"center","Version":"18","Locale":"en","Title":"set_config","Summary":"Sets the parameter setting_name to new_value, and returns that value. If is_local is true, the new value will only apply during the current transaction. If you want the new value to apply for the rest of the current session, use false instead. This function corresponds to the SQL command SET.","BodyHTML":"Sets the parameter \u003cem\u003e\u003ccode\u003esetting_name\u003c/code\u003e\u003c/em\u003e to \u003cem\u003e\u003ccode\u003enew_value\u003c/code\u003e\u003c/em\u003e, and returns that value. If \u003cem\u003e\u003ccode\u003eis_local\u003c/code\u003e\u003c/em\u003e is \u003ccode\u003etrue\u003c/code\u003e, the new value will only apply during the current transaction. If you want the new value to apply for the rest of the current session, use \u003ccode\u003efalse\u003c/code\u003e instead. This function corresponds to the SQL command \u003ca href=\"/docs/18/sql-set.html\" title=\"SET\" rel=\"nofollow\"\u003e\u003cspan\u003eSET\u003c/span\u003e\u003c/a\u003e.","SourceRevision":"wiki-repair-20261023:a788160642ba150adb677fc7df7015de42438d8eb2a5875f97a81b495e0d38f8","ContentHash":"9386c77beb9e6b855666e62e12a9b4c0fe1f5bc60a1d3da8bf6377ebb930a280","Payload":{"description":"Sets the parameter setting_name to new_value, and returns that value. If is_local is true, the new value will only apply during the current transaction. If you want the new value to apply for the rest of the current session, use false instead. This function corresponds to the SQL command SET.","description_html":"Sets the parameter \u003cem class=\"parameter\"\u003e\u003ccode\u003esetting_name\u003c/code\u003e\u003c/em\u003e to \u003cem class=\"parameter\"\u003e\u003ccode\u003enew_value\u003c/code\u003e\u003c/em\u003e, and returns that value. If \u003cem class=\"parameter\"\u003e\u003ccode\u003eis_local\u003c/code\u003e\u003c/em\u003e is \u003ccode class=\"literal\"\u003etrue\u003c/code\u003e, the new value will only apply during the current transaction. If you want the new value to apply for the rest of the current session, use \u003ccode class=\"literal\"\u003efalse\u003c/code\u003e instead. This function corresponds to the SQL command \u003ca href=\"/docs/18/sql-set.html\" title=\"SET\"\u003e\u003cspan class=\"refentrytitle\"\u003eSET\u003c/span\u003e\u003c/a\u003e.","signatures":[{"description":"Sets the parameter setting_name to new_value, and returns that value. If is_local is true, the new value will only apply during the current transaction. If you want the new value to apply for the rest of the current session, use false instead. This function corresponds to the SQL command SET.","description_html":"Sets the parameter \u003cem class=\"parameter\"\u003e\u003ccode\u003esetting_name\u003c/code\u003e\u003c/em\u003e to \u003cem class=\"parameter\"\u003e\u003ccode\u003enew_value\u003c/code\u003e\u003c/em\u003e, and returns that value. If \u003cem class=\"parameter\"\u003e\u003ccode\u003eis_local\u003c/code\u003e\u003c/em\u003e is \u003ccode class=\"literal\"\u003etrue\u003c/code\u003e, the new value will only apply during the current transaction. If you want the new value to apply for the rest of the current session, use \u003ccode class=\"literal\"\u003efalse\u003c/code\u003e instead. This function corresponds to the SQL command \u003ca href=\"/docs/18/sql-set.html\" title=\"SET\"\u003e\u003cspan class=\"refentrytitle\"\u003eSET\u003c/span\u003e\u003c/a\u003e.","description_zh":"将参数 setting_name 设置为 new_value，并返回该值。如果 is_local 为 true，新值仅在当前事务期间生效。如果希望新值在当前会话的剩余时间内生效，则使用 false。此函数对应 SQL 命令 SET。","description_zh_html":"将参数 \u003cem class=\"parameter\"\u003e\u003ccode\u003esetting_name\u003c/code\u003e\u003c/em\u003e 设置为 \u003cem class=\"parameter\"\u003e\u003ccode\u003enew_value\u003c/code\u003e\u003c/em\u003e，并返回该值。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003eis_local\u003c/code\u003e\u003c/em\u003e 为 \u003ccode class=\"literal\"\u003etrue\u003c/code\u003e，新值仅在当前事务期间生效。如果希望新值在当前会话的剩余时间内生效，则使用 \u003ccode class=\"literal\"\u003efalse\u003c/code\u003e。此函数对应 SQL 命令 \u003ca href=\"/docs/18/sql-set.html\" title=\"SET\"\u003e\u003cspan class=\"refentrytitle\"\u003eSET\u003c/span\u003e\u003c/a\u003e。","examples":[{"expr":"set_config('log_statement_stats', 'off', false)","result":"off"}],"html":"\u003ccode class=\"function\"\u003eset_config\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003esetting_name\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003enew_value\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003eis_local\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"set_config ( setting_name text, new_value text, is_local boolean ) → text","zh_from":"same-version-manual"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.3","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"3546ccf4dfc568cc685d147fa5e47422ba01aa9d31a7d154ab89175f945edf7a","Text":"set_config ( setting_name text, new_value text, is_local boolean ) → text","Returns":"text","Payload":{"description":"Sets the parameter setting_name to new_value, and returns that value. If is_local is true, the new value will only apply during the current transaction. If you want the new value to apply for the rest of the current session, use false instead. This function corresponds to the SQL command SET.","description_html":"Sets the parameter \u003cem class=\"parameter\"\u003e\u003ccode\u003esetting_name\u003c/code\u003e\u003c/em\u003e to \u003cem class=\"parameter\"\u003e\u003ccode\u003enew_value\u003c/code\u003e\u003c/em\u003e, and returns that value. If \u003cem class=\"parameter\"\u003e\u003ccode\u003eis_local\u003c/code\u003e\u003c/em\u003e is \u003ccode class=\"literal\"\u003etrue\u003c/code\u003e, the new value will only apply during the current transaction. If you want the new value to apply for the rest of the current session, use \u003ccode class=\"literal\"\u003efalse\u003c/code\u003e instead. This function corresponds to the SQL command \u003ca href=\"/docs/18/sql-set.html\" title=\"SET\"\u003e\u003cspan class=\"refentrytitle\"\u003eSET\u003c/span\u003e\u003c/a\u003e.","description_zh":"将参数 setting_name 设置为 new_value，并返回该值。如果 is_local 为 true，新值仅在当前事务期间生效。如果希望新值在当前会话的剩余时间内生效，则使用 false。此函数对应 SQL 命令 SET。","description_zh_html":"将参数 \u003cem class=\"parameter\"\u003e\u003ccode\u003esetting_name\u003c/code\u003e\u003c/em\u003e 设置为 \u003cem class=\"parameter\"\u003e\u003ccode\u003enew_value\u003c/code\u003e\u003c/em\u003e，并返回该值。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003eis_local\u003c/code\u003e\u003c/em\u003e 为 \u003ccode class=\"literal\"\u003etrue\u003c/code\u003e，新值仅在当前事务期间生效。如果希望新值在当前会话的剩余时间内生效，则使用 \u003ccode class=\"literal\"\u003efalse\u003c/code\u003e。此函数对应 SQL 命令 \u003ca href=\"/docs/18/sql-set.html\" title=\"SET\"\u003e\u003cspan class=\"refentrytitle\"\u003eSET\u003c/span\u003e\u003c/a\u003e。","examples":[{"expr":"set_config('log_statement_stats', 'off', false)","result":"off"}],"html":"\u003ccode class=\"function\"\u003eset_config\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003esetting_name\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003enew_value\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003eis_local\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"set_config ( setting_name text, new_value text, is_local boolean ) → text","zh_from":"same-version-manual"}}],"Spellings":null,"SQLState":null,"Evidence":null}
