{"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","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"],"signature":"set_config ( setting_name text, new_value text, is_local boolean ) → text","signature_count":1,"slug":"set-config","source_rev":"b7bd9cda","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":"b7bd9cda","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":"","description_zh_html":"","doc":{"anchor":"FUNCTIONS-ADMIN-SET-TABLE","file":"functions-admin.html","slug":"18"},"group":"admin","group_label":"System Administration Functions","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":"","description_zh_html":"","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":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-ADMIN-SET-TABLE","file":"functions-admin.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"set-config","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"set_config","Summary":"将参数setting_name设置为new_value，并返回该值。如果is_local为true，新值仅在当前事务期间生效。如果希望新值在当前会话的剩余时间内生效，则使用false。此函数对应 SQL 命令SET。","BodyHTML":"将参数\u003cem\u003e\u003ccode\u003esetting_name\u003c/code\u003e\u003c/em\u003e设置为\u003cem\u003e\u003ccode\u003enew_value\u003c/code\u003e\u003c/em\u003e，并返回该值。如果\u003cem\u003e\u003ccode\u003eis_local\u003c/code\u003e\u003c/em\u003e为\u003ccode\u003etrue\u003c/code\u003e，新值仅在当前事务期间生效。如果希望新值在当前会话的剩余时间内生效，则使用\u003ccode\u003efalse\u003c/code\u003e。此函数对应 SQL 命令\u003ca href=\"/docs/18/sql-set.html\" title=\"SET\" rel=\"nofollow\"\u003e\u003cspan\u003eSET\u003c/span\u003e\u003c/a\u003e。\u003cpre\u003eset_config ( setting_name text, new_value text, is_local boolean ) → text\u003c/pre\u003e将参数\u003cem\u003e\u003ccode\u003esetting_name\u003c/code\u003e\u003c/em\u003e设置为\u003cem\u003e\u003ccode\u003enew_value\u003c/code\u003e\u003c/em\u003e，并返回该值。如果\u003cem\u003e\u003ccode\u003eis_local\u003c/code\u003e\u003c/em\u003e为\u003ccode\u003etrue\u003c/code\u003e，新值仅在当前事务期间生效。如果希望新值在当前会话的剩余时间内生效，则使用\u003ccode\u003efalse\u003c/code\u003e。此函数对应 SQL 命令\u003ca href=\"/docs/18/sql-set.html\" title=\"SET\" rel=\"nofollow\"\u003e\u003cspan\u003eSET\u003c/span\u003e\u003c/a\u003e。","SourceRevision":"ca936764","ContentHash":"d31a5f54359851abe55f94448a80ae2df5072945974d153cbe62df7d7e8feb23","Payload":{"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。","signatures":[{"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。","returns":"text","text":"set_config ( setting_name text, new_value text, is_local boolean ) → text","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","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":"","description_zh_html":"","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":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
