{"Entry":{"collection":"func","key":"set-byte","name":"set_byte","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":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"}],"content_hash":"93c5db9ab3ec67e357fe37af75538207a0c922ed85afdc6d054c461365d83ceb","first_version":"7.3","group":"binarystring","group_label":"Binary String Functions And Operators","groups":["binarystring"],"imported_at":"2026-09-27T17:57:28.488753+08:00","last_version":"20","name":"set_byte","name_key":"set_byte","position":4011,"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_byte ( bytes bytea, n integer, newvalue integer ) → bytea","signature_count":1,"slug":"set-byte","source_rev":"b7bd9cda","summary":"Sets n'th byte in binary string to newvalue.","summary_zh":""}},"Definition":{"Collection":"func","Key":"set-byte","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"set-byte","SourceRevision":"b7bd9cda","Facts":{"description":"Sets n'th byte in binary string to newvalue.","description_html":"Sets \u003ca href=\"/docs/18/functions-binarystring.html#FUNCTIONS-ZEROBASED-NOTE\"\u003en'th\u003c/a\u003e byte in binary string to \u003cem class=\"parameter\"\u003e\u003ccode\u003enewvalue\u003c/code\u003e\u003c/em\u003e.","description_zh":"","description_zh_html":"","doc":{"anchor":"FUNCTIONS-BINARYSTRING-OTHER","file":"functions-binarystring.html","slug":"18"},"group":"binarystring","group_label":"Binary String Functions And Operators","lang":"en","layout":"table-new","pages":["functions-binarystring.html"],"prose_only":false,"signatures":[{"description":"Sets n'th byte in binary string to newvalue.","description_html":"Sets \u003ca href=\"/docs/18/functions-binarystring.html#FUNCTIONS-ZEROBASED-NOTE\"\u003en'th\u003c/a\u003e byte in binary string to \u003cem class=\"parameter\"\u003e\u003ccode\u003enewvalue\u003c/code\u003e\u003c/em\u003e.","description_zh":"","description_zh_html":"","examples":[{"expr":"set_byte('\\x1234567890'::bytea, 4, 64)","result":"\\x1234567840"}],"html":"\u003ccode class=\"function\"\u003eset_byte\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003ebytes\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ebytea\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003en\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003enewvalue\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebytea\u003c/code\u003e","returns":"bytea","text":"set_byte ( bytes bytea, n integer, newvalue integer ) → bytea","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-BINARYSTRING-OTHER","file":"functions-binarystring.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"set-byte","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"set_byte","Summary":"将二进制字符串中编号为 n 的字节设置为 newvalue。","BodyHTML":"将二进制字符串中\u003ca href=\"/docs/18/functions-binarystring.html#FUNCTIONS-ZEROBASED-NOTE\" rel=\"nofollow\"\u003e编号为 n 的\u003c/a\u003e字节设置为 \u003cem\u003e\u003ccode\u003enewvalue\u003c/code\u003e\u003c/em\u003e。\u003cpre\u003eset_byte ( bytes bytea, n integer, newvalue integer ) → bytea\u003c/pre\u003e将二进制字符串中\u003ca href=\"/docs/18/functions-binarystring.html#FUNCTIONS-ZEROBASED-NOTE\" rel=\"nofollow\"\u003e编号为 n 的\u003c/a\u003e字节设置为 \u003cem\u003e\u003ccode\u003enewvalue\u003c/code\u003e\u003c/em\u003e。","SourceRevision":"ca936764","ContentHash":"00156221936b10db17e5ce7846226383ac90668773236d210845655eaa39f73a","Payload":{"description_zh":"将二进制字符串中编号为 n 的字节设置为 newvalue。","description_zh_html":"将二进制字符串中\u003ca href=\"/docs/18/functions-binarystring.html#FUNCTIONS-ZEROBASED-NOTE\"\u003e编号为 n 的\u003c/a\u003e字节设置为 \u003cem class=\"parameter\"\u003e\u003ccode\u003enewvalue\u003c/code\u003e\u003c/em\u003e。","signatures":[{"description_zh":"将二进制字符串中编号为 n 的字节设置为 newvalue。","description_zh_html":"将二进制字符串中\u003ca href=\"/docs/18/functions-binarystring.html#FUNCTIONS-ZEROBASED-NOTE\"\u003e编号为 n 的\u003c/a\u003e字节设置为 \u003cem class=\"parameter\"\u003e\u003ccode\u003enewvalue\u003c/code\u003e\u003c/em\u003e。","returns":"bytea","text":"set_byte ( bytes bytea, n integer, newvalue integer ) → bytea","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":"2a75b8341a68b272a46e44a2539b9f50a1b3dc171a98dd698f87e0efb783abd3","Text":"set_byte ( bytes bytea, n integer, newvalue integer ) → bytea","Returns":"bytea","Payload":{"description":"Sets n'th byte in binary string to newvalue.","description_html":"Sets \u003ca href=\"/docs/18/functions-binarystring.html#FUNCTIONS-ZEROBASED-NOTE\"\u003en'th\u003c/a\u003e byte in binary string to \u003cem class=\"parameter\"\u003e\u003ccode\u003enewvalue\u003c/code\u003e\u003c/em\u003e.","description_zh":"","description_zh_html":"","examples":[{"expr":"set_byte('\\x1234567890'::bytea, 4, 64)","result":"\\x1234567840"}],"html":"\u003ccode class=\"function\"\u003eset_byte\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003ebytes\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ebytea\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003en\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003enewvalue\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebytea\u003c/code\u003e","returns":"bytea","text":"set_byte ( bytes bytea, n integer, newvalue integer ) → bytea","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
