{"Entry":{"collection":"func","key":"string-to-array","name":"string_to_array","aliases":[],"metadata":{"changed_in":["9.1"],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"7.3","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"7.4"},{"descriptions_changed":true,"doc_overhaul":false,"from":"7.4","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"8.0"},{"descriptions_changed":true,"doc_overhaul":false,"from":"8.3","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"8.4"},{"descriptions_changed":true,"doc_overhaul":false,"from":"9.0","group_changed":null,"signatures":{"added":["string_to_array ( text, text [, text] ) → text[]"],"removed":["string_to_array ( text, text ) → text[]"]},"status":"changed","to":"9.1"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"},{"descriptions_changed":true,"doc_overhaul":false,"from":"13","group_changed":{"from":"array","to":"string"},"signatures":{"added":[],"removed":[]},"status":"changed","to":"14"},{"descriptions_changed":true,"doc_overhaul":false,"from":"14","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"15"}],"content_hash":"8670d027d048a4618a2c3a352f635acce1a7de31af96357eb6f0a12810d5e848","derived_content_hash":"931e98b3418f18a9edcb68e8ba8b0c0d2e5f486198812390c2329219dd64095e","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:7ea2ebc296e0e60db401aa264243f4ec95559719178103d74ab1b98597d9bed1","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"first_version":"7.4","group":"string","group_label":"String Functions And Operators","groups":["string","array"],"imported_at":"2026-09-27T17:57:28.425668+08:00","last_version":"20","name":"string_to_array","name_key":"string_to_array","position":3044,"present_in":["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":"b7bd9cda","receipt_sha256":"7f849901c9e84db227f4fabfcb9e1c2d7d276a9e33a248b2f05ec779896df275","repair":"wiki-repair-20261023"},"signature":"string_to_array ( string text, delimiter text [, null_string text ] ) → text[]","signature_count":1,"slug":"string-to-array","source_rev":"wiki-repair-20261023:7ea2ebc296e0e60db401aa264243f4ec95559719178103d74ab1b98597d9bed1","summary":"Splits the string at occurrences of delimiter and forms the resulting fields into a text array.","summary_zh":""}},"Definition":{"Collection":"func","Key":"string-to-array","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"string-to-array","SourceRevision":"wiki-repair-20261023:7ea2ebc296e0e60db401aa264243f4ec95559719178103d74ab1b98597d9bed1","Facts":{"description":"Splits the string at occurrences of delimiter and forms the resulting fields into a text array. If delimiter is NULL, each character in the string will become a separate element in the array. If delimiter is an empty string, then the string is treated as a single field. If null_string is supplied and is not NULL, fields matching that string are replaced by NULL. See also array_to_string.","description_html":"Splits the \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e at occurrences of \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e and forms the resulting fields into a \u003ccode class=\"type\"\u003etext\u003c/code\u003e array. If \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e is \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e, each character in the \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e will become a separate element in the array. If \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e is an empty string, then the \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e is treated as a single field. If \u003cem class=\"parameter\"\u003e\u003ccode\u003enull_string\u003c/code\u003e\u003c/em\u003e is supplied and is not \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e, fields matching that string are replaced by \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e. See also \u003ca href=\"/docs/18/functions-array.html#FUNCTION-ARRAY-TO-STRING\"\u003e\u003ccode class=\"function\"\u003earray_to_string\u003c/code\u003e\u003c/a\u003e.","description_zh":"将 string 按 delimiter 分割，并将结果字段形成 text 数组。如果 delimiter 是 NULL，则 string 中的每个字符将成为数组中的一个单独元素。如果 delimiter 是空字符串，则 string 被视为单个字段。如果提供了 null_string 且不是 NULL，则匹配该字符串的字段将被 NULL 替换。另请参见 array_to_string。","description_zh_html":"将 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 按 \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e 分割，并将结果字段形成 \u003ccode class=\"type\"\u003etext\u003c/code\u003e 数组。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e 是 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e，则 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 中的每个字符将成为数组中的一个单独元素。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e 是空字符串，则 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 被视为单个字段。如果提供了 \u003cem class=\"parameter\"\u003e\u003ccode\u003enull_string\u003c/code\u003e\u003c/em\u003e 且不是 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e，则匹配该字符串的字段将被 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e 替换。另请参见 \u003ca href=\"/docs/18/functions-array.html#FUNCTION-ARRAY-TO-STRING\"\u003e\u003ccode class=\"function\"\u003earray_to_string\u003c/code\u003e\u003c/a\u003e。","doc":{"anchor":"FUNCTIONS-STRING-OTHER","file":"functions-string.html","sha256":"dbe9f91e55c35969d99a8d2697b6f7bd5388a24ccc2b89706a666f176025f1e2","slug":"18"},"documentation_revision":{"inputs":[{"file":"functions-string.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"dbe9f91e55c35969d99a8d2697b6f7bd5388a24ccc2b89706a666f176025f1e2","version":"18.7"},{"file":"functions-string.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"7eecd3bb343149124be0476a539f3c682476eab2a15489a0e0ad06fbb769ea9e","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"group":"string","group_label":"字符串函数和操作符","lang":"en","layout":"table-new","pages":["functions-string.html"],"prose_only":false,"signatures":[{"description":"Splits the string at occurrences of delimiter and forms the resulting fields into a text array. If delimiter is NULL, each character in the string will become a separate element in the array. If delimiter is an empty string, then the string is treated as a single field. If null_string is supplied and is not NULL, fields matching that string are replaced by NULL. See also array_to_string.","description_html":"Splits the \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e at occurrences of \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e and forms the resulting fields into a \u003ccode class=\"type\"\u003etext\u003c/code\u003e array. If \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e is \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e, each character in the \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e will become a separate element in the array. If \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e is an empty string, then the \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e is treated as a single field. If \u003cem class=\"parameter\"\u003e\u003ccode\u003enull_string\u003c/code\u003e\u003c/em\u003e is supplied and is not \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e, fields matching that string are replaced by \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e. See also \u003ca href=\"/docs/18/functions-array.html#FUNCTION-ARRAY-TO-STRING\"\u003e\u003ccode class=\"function\"\u003earray_to_string\u003c/code\u003e\u003c/a\u003e.","description_zh":"将 string 按 delimiter 分割，并将结果字段形成 text 数组。如果 delimiter 是 NULL，则 string 中的每个字符将成为数组中的一个单独元素。如果 delimiter 是空字符串，则 string 被视为单个字段。如果提供了 null_string 且不是 NULL，则匹配该字符串的字段将被 NULL 替换。另请参见 array_to_string。","description_zh_html":"将 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 按 \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e 分割，并将结果字段形成 \u003ccode class=\"type\"\u003etext\u003c/code\u003e 数组。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e 是 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e，则 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 中的每个字符将成为数组中的一个单独元素。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e 是空字符串，则 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 被视为单个字段。如果提供了 \u003cem class=\"parameter\"\u003e\u003ccode\u003enull_string\u003c/code\u003e\u003c/em\u003e 且不是 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e，则匹配该字符串的字段将被 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e 替换。另请参见 \u003ca href=\"/docs/18/functions-array.html#FUNCTION-ARRAY-TO-STRING\"\u003e\u003ccode class=\"function\"\u003earray_to_string\u003c/code\u003e\u003c/a\u003e。","examples":[{"expr":"string_to_array('xx~~yy~~zz', '~~', 'yy')","result":"{xx,NULL,zz}"}],"html":"\u003ccode class=\"function\"\u003estring_to_array\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003enull_string\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003etext[]\u003c/code\u003e","returns":"text[]","text":"string_to_array ( string text, delimiter text [, null_string text] ) → text[]","zh_from":"same-version-manual"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-string.html","sha256":"0446377e0eccc9299099dc4b4b293204c337e3abefcdc396e9698bc54dd1080b"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-STRING-OTHER","file":"functions-string.html","sha256":"dbe9f91e55c35969d99a8d2697b6f7bd5388a24ccc2b89706a666f176025f1e2","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"string-to-array","SourceDatabase":"center","Version":"18","Locale":"en","Title":"string_to_array","Summary":"Splits the string at occurrences of delimiter and forms the resulting fields into a text array. If delimiter is NULL, each character in the string will become a separate element in the array. If delimiter is an empty string, then the string is treated as a single field. If null_string is supplied and is not NULL, fields matching that string are replaced by NULL. See also array_to_string.","BodyHTML":"Splits the \u003cem\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e at occurrences of \u003cem\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e and forms the resulting fields into a \u003ccode\u003etext\u003c/code\u003e array. If \u003cem\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e is \u003ccode\u003eNULL\u003c/code\u003e, each character in the \u003cem\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e will become a separate element in the array. If \u003cem\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e is an empty string, then the \u003cem\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e is treated as a single field. If \u003cem\u003e\u003ccode\u003enull_string\u003c/code\u003e\u003c/em\u003e is supplied and is not \u003ccode\u003eNULL\u003c/code\u003e, fields matching that string are replaced by \u003ccode\u003eNULL\u003c/code\u003e. See also \u003ca href=\"/docs/18/functions-array.html#FUNCTION-ARRAY-TO-STRING\" rel=\"nofollow\"\u003e\u003ccode\u003earray_to_string\u003c/code\u003e\u003c/a\u003e.","SourceRevision":"wiki-repair-20261023:7ea2ebc296e0e60db401aa264243f4ec95559719178103d74ab1b98597d9bed1","ContentHash":"189c1d1b68a5fe95305893fa1a474e0e4abb3457547a27f6a1eb509794f1413e","Payload":{"description":"Splits the string at occurrences of delimiter and forms the resulting fields into a text array. If delimiter is NULL, each character in the string will become a separate element in the array. If delimiter is an empty string, then the string is treated as a single field. If null_string is supplied and is not NULL, fields matching that string are replaced by NULL. See also array_to_string.","description_html":"Splits the \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e at occurrences of \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e and forms the resulting fields into a \u003ccode class=\"type\"\u003etext\u003c/code\u003e array. If \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e is \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e, each character in the \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e will become a separate element in the array. If \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e is an empty string, then the \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e is treated as a single field. If \u003cem class=\"parameter\"\u003e\u003ccode\u003enull_string\u003c/code\u003e\u003c/em\u003e is supplied and is not \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e, fields matching that string are replaced by \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e. See also \u003ca href=\"/docs/18/functions-array.html#FUNCTION-ARRAY-TO-STRING\"\u003e\u003ccode class=\"function\"\u003earray_to_string\u003c/code\u003e\u003c/a\u003e.","signatures":[{"description":"Splits the string at occurrences of delimiter and forms the resulting fields into a text array. If delimiter is NULL, each character in the string will become a separate element in the array. If delimiter is an empty string, then the string is treated as a single field. If null_string is supplied and is not NULL, fields matching that string are replaced by NULL. See also array_to_string.","description_html":"Splits the \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e at occurrences of \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e and forms the resulting fields into a \u003ccode class=\"type\"\u003etext\u003c/code\u003e array. If \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e is \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e, each character in the \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e will become a separate element in the array. If \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e is an empty string, then the \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e is treated as a single field. If \u003cem class=\"parameter\"\u003e\u003ccode\u003enull_string\u003c/code\u003e\u003c/em\u003e is supplied and is not \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e, fields matching that string are replaced by \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e. See also \u003ca href=\"/docs/18/functions-array.html#FUNCTION-ARRAY-TO-STRING\"\u003e\u003ccode class=\"function\"\u003earray_to_string\u003c/code\u003e\u003c/a\u003e.","description_zh":"将 string 按 delimiter 分割，并将结果字段形成 text 数组。如果 delimiter 是 NULL，则 string 中的每个字符将成为数组中的一个单独元素。如果 delimiter 是空字符串，则 string 被视为单个字段。如果提供了 null_string 且不是 NULL，则匹配该字符串的字段将被 NULL 替换。另请参见 array_to_string。","description_zh_html":"将 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 按 \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e 分割，并将结果字段形成 \u003ccode class=\"type\"\u003etext\u003c/code\u003e 数组。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e 是 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e，则 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 中的每个字符将成为数组中的一个单独元素。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e 是空字符串，则 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 被视为单个字段。如果提供了 \u003cem class=\"parameter\"\u003e\u003ccode\u003enull_string\u003c/code\u003e\u003c/em\u003e 且不是 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e，则匹配该字符串的字段将被 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e 替换。另请参见 \u003ca href=\"/docs/18/functions-array.html#FUNCTION-ARRAY-TO-STRING\"\u003e\u003ccode class=\"function\"\u003earray_to_string\u003c/code\u003e\u003c/a\u003e。","examples":[{"expr":"string_to_array('xx~~yy~~zz', '~~', 'yy')","result":"{xx,NULL,zz}"}],"html":"\u003ccode class=\"function\"\u003estring_to_array\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003enull_string\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003etext[]\u003c/code\u003e","returns":"text[]","text":"string_to_array ( string text, delimiter text [, null_string text] ) → text[]","zh_from":"same-version-manual"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","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":"62c00a9e339efb4ec93874d59151b571f9198ef5d51d7c284bf74271ae053828","Text":"string_to_array ( string text, delimiter text [, null_string text] ) → text[]","Returns":"text[]","Payload":{"description":"Splits the string at occurrences of delimiter and forms the resulting fields into a text array. If delimiter is NULL, each character in the string will become a separate element in the array. If delimiter is an empty string, then the string is treated as a single field. If null_string is supplied and is not NULL, fields matching that string are replaced by NULL. See also array_to_string.","description_html":"Splits the \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e at occurrences of \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e and forms the resulting fields into a \u003ccode class=\"type\"\u003etext\u003c/code\u003e array. If \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e is \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e, each character in the \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e will become a separate element in the array. If \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e is an empty string, then the \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e is treated as a single field. If \u003cem class=\"parameter\"\u003e\u003ccode\u003enull_string\u003c/code\u003e\u003c/em\u003e is supplied and is not \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e, fields matching that string are replaced by \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e. See also \u003ca href=\"/docs/18/functions-array.html#FUNCTION-ARRAY-TO-STRING\"\u003e\u003ccode class=\"function\"\u003earray_to_string\u003c/code\u003e\u003c/a\u003e.","description_zh":"将 string 按 delimiter 分割，并将结果字段形成 text 数组。如果 delimiter 是 NULL，则 string 中的每个字符将成为数组中的一个单独元素。如果 delimiter 是空字符串，则 string 被视为单个字段。如果提供了 null_string 且不是 NULL，则匹配该字符串的字段将被 NULL 替换。另请参见 array_to_string。","description_zh_html":"将 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 按 \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e 分割，并将结果字段形成 \u003ccode class=\"type\"\u003etext\u003c/code\u003e 数组。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e 是 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e，则 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 中的每个字符将成为数组中的一个单独元素。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e 是空字符串，则 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 被视为单个字段。如果提供了 \u003cem class=\"parameter\"\u003e\u003ccode\u003enull_string\u003c/code\u003e\u003c/em\u003e 且不是 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e，则匹配该字符串的字段将被 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e 替换。另请参见 \u003ca href=\"/docs/18/functions-array.html#FUNCTION-ARRAY-TO-STRING\"\u003e\u003ccode class=\"function\"\u003earray_to_string\u003c/code\u003e\u003c/a\u003e。","examples":[{"expr":"string_to_array('xx~~yy~~zz', '~~', 'yy')","result":"{xx,NULL,zz}"}],"html":"\u003ccode class=\"function\"\u003estring_to_array\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003edelimiter\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003enull_string\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003etext[]\u003c/code\u003e","returns":"text[]","text":"string_to_array ( string text, delimiter text [, null_string text] ) → text[]","zh_from":"same-version-manual"}}],"Spellings":null,"SQLState":null,"Evidence":null}
