{"Entry":{"collection":"func","key":"substring","name":"substring","aliases":[],"metadata":{"changed_in":["7.2","7.3","8.1","12","14","19"],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"7.1","group_changed":null,"signatures":{"added":["substring ( string [from integer] [for integer] ) → bytea"],"removed":[]},"status":"changed","to":"7.2"},{"descriptions_changed":true,"doc_overhaul":false,"from":"7.2","group_changed":null,"signatures":{"added":["substring ( string from pattern ) → text","substring ( string from pattern for escape ) → text"],"removed":[]},"status":"changed","to":"7.3"},{"descriptions_changed":false,"doc_overhaul":false,"from":"8.0","group_changed":null,"signatures":{"added":["substring ( string [from int] [for int] ) → text","substring ( string [from int] [for int] ) → bytea"],"removed":["substring ( string [from integer] [for integer] ) → text","substring ( string [from integer] [for integer] ) → bytea"]},"status":"changed","to":"8.1"},{"descriptions_changed":false,"doc_overhaul":false,"from":"11","group_changed":null,"signatures":{"added":["substring(string from pattern for escape-character)","substring(string, pattern, escape-character)"],"removed":[]},"status":"changed","to":"12"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"},{"descriptions_changed":false,"doc_overhaul":false,"from":"13","group_changed":null,"signatures":{"added":["substring ( string text SIMILAR pattern text ESCAPE escape text ) → text","substring(string similar pattern escape escape-character)"],"removed":[]},"status":"changed","to":"14"},{"descriptions_changed":false,"doc_overhaul":false,"from":"18","group_changed":null,"signatures":{"added":["substring(string SIMILAR pattern ESCAPE escape-character)","substring(string FROM pattern FOR escape-character)","substring(string from pattern) → text","substring(string, pattern) → text"],"removed":["substring(string similar pattern escape escape-character)","substring(string from pattern for escape-character)"]},"status":"changed","to":"19"}],"content_hash":"891a44274fd8470c102beca7e18270fef25f3b675a53674a194522936f6d2483","derived_content_hash":"3bbd8b3375270e5fa2201ecba1a660abd45ee855b5e105671f568ef71c8a4542","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:28b204fb9ed2c138153901739cd98a981867b03c8737a3d38c32e21f8867ba22","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"first_version":"7.1","group":"string","group_label":"String Functions And Operators","groups":["string","binarystring","bitstring","matching"],"imported_at":"2026-09-27T17:57:28.437005+08:00","last_version":"20","name":"substring","name_key":"substring","position":3048,"present_in":["7.1","7.2","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:55c63fdf10eeb969ca43ccca986282049f89d324ff92ffb23d9ecd98ac85efb6","receipt_sha256":"08ffc9b80370bfcbfd3835c9812d0f315f1137772e1f00bd5a3fab11cbd07400","repair":"wiki-repair-20261023"},"signature":"substring ( string text [ FROM start integer ] [ FOR count integer ] ) → text","signature_count":11,"slug":"substring","source_rev":"wiki-repair-20261023:28b204fb9ed2c138153901739cd98a981867b03c8737a3d38c32e21f8867ba22","summary":"Extracts the substring of string starting at the start'th character if that is specified, and stopping after count characters if that is specified.","summary_zh":""}},"Definition":{"Collection":"func","Key":"substring","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"substring","SourceRevision":"wiki-repair-20261023:28b204fb9ed2c138153901739cd98a981867b03c8737a3d38c32e21f8867ba22","Facts":{"description":"Extracts the substring of string starting at the start'th character if that is specified, and stopping after count characters if that is specified. Provide at least one of start and count.","description_html":"Extracts the substring of \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e starting at the \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e'th character if that is specified, and stopping after \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e characters if that is specified. Provide at least one of \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e.","description_zh":"提取 string 的子字符串：若指定了起始位置，则从第 start 个字符开始；若指定了长度，则在提取 count 个字符后停止。start 和 count 至少需要指定一个。","description_zh_html":"提取 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 的子字符串：若指定了起始位置，则从第 \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e 个字符开始；若指定了长度，则在提取 \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e 个字符后停止。\u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e 和 \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e 至少需要指定一个。","doc":{"anchor":"FUNCTIONS-STRING-SQL","file":"functions-string.html","sha256":"dbe9f91e55c35969d99a8d2697b6f7bd5388a24ccc2b89706a666f176025f1e2","slug":"18"},"documentation_revision":{"inputs":[{"file":"functions-binarystring.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"cd434063935e362cbb3621171770936b04bafcd58673d71a20cd6992580b2d84","version":"18.7"},{"file":"functions-bitstring.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"270c5c14b6fe519e8d8cc3f7514e0202aa8d534d1e9c8f62ab1ad6802faaa531","version":"18.7"},{"file":"functions-matching.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"8cd962b980b0a1516c6ccdfd9961c2d256ad9b31e065d6c07a3ac7fcf1b69a2f","version":"18.7"},{"file":"functions-string.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"dbe9f91e55c35969d99a8d2697b6f7bd5388a24ccc2b89706a666f176025f1e2","version":"18.7"},{"file":"functions-binarystring.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"a5ee5be3c79e45371853d5c6dd8b1b3f52734bbc17726dbe626837179a1da1e0","version":"18.7"},{"file":"functions-bitstring.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"6b6423f8b2751016eae606a5cdcf7062bd62f230a0ef96b83e357418208bc67e","version":"18.7"},{"file":"functions-matching.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"eb029e71fe7fe0a8374a9956ba571b1cf112607df810495cbbccde6d51959f76","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","functions-binarystring.html","functions-bitstring.html","functions-matching.html"],"prose_only":false,"signatures":[{"description":"Extracts the substring of string starting at the start'th character if that is specified, and stopping after count characters if that is specified. Provide at least one of start and count.","description_html":"Extracts the substring of \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e starting at the \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e'th character if that is specified, and stopping after \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e characters if that is specified. Provide at least one of \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e.","description_zh":"提取 string 的子字符串：若指定了起始位置，则从第 start 个字符开始；若指定了长度，则在提取 count 个字符后停止。start 和 count 至少需要指定一个。","description_zh_html":"提取 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 的子字符串：若指定了起始位置，则从第 \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e 个字符开始；若指定了长度，则在提取 \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e 个字符后停止。\u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e 和 \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e 至少需要指定一个。","examples":[{"expr":"substring('Thomas' from 2 for 3)","result":"hom"},{"expr":"substring('Thomas' from 3)","result":"omas"},{"expr":"substring('Thomas' for 2)","result":"Th"}],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e [\u003cspan class=\"optional\"\u003e\u003ccode class=\"literal\"\u003eFROM\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e\u003c/span\u003e] [\u003cspan class=\"optional\"\u003e\u003ccode class=\"literal\"\u003eFOR\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"substring ( string text [FROM start integer] [FOR count integer] ) → text","zh_from":"same-version-manual"},{"description":"Extracts the first substring matching POSIX regular expression; see Section 9.7.3.","description_html":"Extracts the first substring matching POSIX regular expression; see \u003ca href=\"/docs/18/functions-matching.html#FUNCTIONS-POSIX-REGEXP\" title=\"9.7.3. POSIX Regular Expressions\"\u003eSection 9.7.3\u003c/a\u003e.","description_zh":"提取匹配 POSIX 正则表达式的第一个子字符串；参见第 9.7.3 节。","description_zh_html":"提取匹配 POSIX 正则表达式的第一个子字符串；参见\u003ca href=\"/docs/18/functions-matching.html#FUNCTIONS-POSIX-REGEXP\" title=\"9.7.3. POSIX正则表达式\"\u003e第 9.7.3 节\u003c/a\u003e。","examples":[{"expr":"substring('Thomas' from '...$')","result":"mas"}],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e \u003ccode class=\"literal\"\u003eFROM\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"substring ( string text FROM pattern text ) → text","zh_from":"same-version-manual"},{"description":"Extracts the first substring matching SQL regular expression; see Section 9.7.2. The first form has been specified since SQL:2003; the second form was only in SQL:1999 and should be considered obsolete.","description_html":"Extracts the first substring matching SQL regular expression; see \u003ca href=\"/docs/18/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP\" title=\"9.7.2. SIMILAR TO Regular Expressions\"\u003eSection 9.7.2\u003c/a\u003e. The first form has been specified since SQL:2003; the second form was only in SQL:1999 and should be considered obsolete.","description_zh":"提取匹配 SQL 正则表达式的第一个子字符串；参见第 9.7.2 节。第一种形式自 SQL:2003 起由标准规定；第二种形式只出现在 SQL:1999 中，应视为已过时。","description_zh_html":"提取匹配 SQL 正则表达式的第一个子字符串；参见\u003ca href=\"/docs/18/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP\" title=\"9.7.2. SIMILAR TO正则表达式\"\u003e第 9.7.2 节\u003c/a\u003e。第一种形式自 SQL:2003 起由标准规定；第二种形式只出现在 SQL:1999 中，应视为已过时。","examples":[{"expr":"substring('Thomas' similar '%#\"o_a#\"_' escape '#')","result":"oma"}],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e \u003ccode class=\"literal\"\u003eSIMILAR\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e \u003ccode class=\"literal\"\u003eESCAPE\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003eescape\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"substring ( string text SIMILAR pattern text ESCAPE escape text ) → text","zh_from":"same-version-manual"},{"description":"Extracts the first substring matching SQL regular expression; see Section 9.7.2. The first form has been specified since SQL:2003; the second form was only in SQL:1999 and should be considered obsolete.","description_html":"Extracts the first substring matching SQL regular expression; see \u003ca href=\"/docs/18/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP\" title=\"9.7.2. SIMILAR TO Regular Expressions\"\u003eSection 9.7.2\u003c/a\u003e. The first form has been specified since SQL:2003; the second form was only in SQL:1999 and should be considered obsolete.","description_zh":"提取匹配 SQL 正则表达式的第一个子字符串；参见第 9.7.2 节。第一种形式自 SQL:2003 起由标准规定；第二种形式只出现在 SQL:1999 中，应视为已过时。","description_zh_html":"提取匹配 SQL 正则表达式的第一个子字符串；参见\u003ca href=\"/docs/18/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP\" title=\"9.7.2. SIMILAR TO正则表达式\"\u003e第 9.7.2 节\u003c/a\u003e。第一种形式自 SQL:2003 起由标准规定；第二种形式只出现在 SQL:1999 中，应视为已过时。","examples":[{"expr":"substring('Thomas' similar '%#\"o_a#\"_' escape '#')","result":"oma"}],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e \u003ccode class=\"literal\"\u003eFROM\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e \u003ccode class=\"literal\"\u003eFOR\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003eescape\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"substring ( string text FROM pattern text FOR escape text ) → text","zh_from":"same-version-manual"},{"description":"Extracts the substring of bytes starting at the start'th byte if that is specified, and stopping after count bytes if that is specified. Provide at least one of start and count.","description_html":"Extracts the substring of \u003cem class=\"parameter\"\u003e\u003ccode\u003ebytes\u003c/code\u003e\u003c/em\u003e starting at the \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e'th byte if that is specified, and stopping after \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e bytes if that is specified. Provide at least one of \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e.","description_zh":"提取 bytes 的子字符串：若指定了起始位置，则从第 start 个字节开始；若指定了长度，则在提取 count 个字节后停止。start 和 count 至少需要指定一个。","description_zh_html":"提取 \u003cem class=\"parameter\"\u003e\u003ccode\u003ebytes\u003c/code\u003e\u003c/em\u003e 的子字符串：若指定了起始位置，则从第 \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e 个字节开始；若指定了长度，则在提取 \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e 个字节后停止。\u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e 和 \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e 至少需要指定一个。","examples":[{"expr":"substring('\\x1234567890'::bytea from 3 for 2)","result":"\\x5678"}],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003ebytes\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ebytea\u003c/code\u003e [\u003cspan class=\"optional\"\u003e\u003ccode class=\"literal\"\u003eFROM\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e\u003c/span\u003e] [\u003cspan class=\"optional\"\u003e\u003ccode class=\"literal\"\u003eFOR\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003ebytea\u003c/code\u003e","returns":"bytea","text":"substring ( bytes bytea [FROM start integer] [FOR count integer] ) → bytea","zh_from":"same-version-manual"},{"description":"Extracts the substring of bits starting at the start'th bit if that is specified, and stopping after count bits if that is specified. Provide at least one of start and count.","description_html":"Extracts the substring of \u003cem class=\"parameter\"\u003e\u003ccode\u003ebits\u003c/code\u003e\u003c/em\u003e starting at the \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e'th bit if that is specified, and stopping after \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e bits if that is specified. Provide at least one of \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e.","description_zh":"提取 bits 的子串：若指定了起始位置，则从第 start 位开始；若指定了长度，则在提取 count 位后停止。start 和 count 至少需要指定一个。","description_zh_html":"提取 \u003cem class=\"parameter\"\u003e\u003ccode\u003ebits\u003c/code\u003e\u003c/em\u003e 的子串：若指定了起始位置，则从第 \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e 位开始；若指定了长度，则在提取 \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e 位后停止。\u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e 和 \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e 至少需要指定一个。","examples":[{"expr":"substring(B'110010111111' from 3 for 2)","result":"00"}],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003ebits\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ebit\u003c/code\u003e [\u003cspan class=\"optional\"\u003e\u003ccode class=\"literal\"\u003eFROM\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e\u003c/span\u003e] [\u003cspan class=\"optional\"\u003e\u003ccode class=\"literal\"\u003eFOR\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003ebit\u003c/code\u003e","returns":"bit","text":"substring ( bits bit [FROM start integer] [FOR count integer] ) → bit","zh_from":"same-version-manual"},{"description":"The substring function with three parameters provides extraction of a substring that matches an SQL regular expression pattern. The function can be written according to standard SQL syntax:","description_html":"The \u003ccode class=\"function\"\u003esubstring\u003c/code\u003e function with three parameters provides extraction of a substring that matches an SQL regular expression pattern. The function can be written according to standard SQL syntax:","description_zh":"带有三个参数的 substring 函数可以提取匹配 SQL 正则表达式模式的子字符串。该函数可以按照标准 SQL 语法书写：","description_zh_html":"带有三个参数的 \u003ccode class=\"function\"\u003esubstring\u003c/code\u003e 函数可以提取匹配 SQL 正则表达式模式的子字符串。该函数可以按照标准 SQL 语法书写：","examples":[],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e(\u003cem class=\"replaceable\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e similar \u003cem class=\"replaceable\"\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e escape \u003cem class=\"replaceable\"\u003e\u003ccode\u003eescape-character\u003c/code\u003e\u003c/em\u003e)","returns":"","text":"substring(string similar pattern escape escape-character)","zh_from":"same-version-manual"},{"description":"The substring function with three parameters provides extraction of a substring that matches an SQL regular expression pattern. The function can be written according to standard SQL syntax:","description_html":"The \u003ccode class=\"function\"\u003esubstring\u003c/code\u003e function with three parameters provides extraction of a substring that matches an SQL regular expression pattern. The function can be written according to standard SQL syntax:","description_zh":"带有三个参数的 substring 函数可以提取匹配 SQL 正则表达式模式的子字符串。该函数可以按照标准 SQL 语法书写：","description_zh_html":"带有三个参数的 \u003ccode class=\"function\"\u003esubstring\u003c/code\u003e 函数可以提取匹配 SQL 正则表达式模式的子字符串。该函数可以按照标准 SQL 语法书写：","examples":[],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e(\u003cem class=\"replaceable\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e from \u003cem class=\"replaceable\"\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e for \u003cem class=\"replaceable\"\u003e\u003ccode\u003eescape-character\u003c/code\u003e\u003c/em\u003e)","returns":"","text":"substring(string from pattern for escape-character)","zh_from":"same-version-manual"},{"description":"As with SIMILAR TO, the specified pattern must match the entire data string, or else the function fails and returns null. To indicate the part of the pattern for which the matching data sub-string is of interest, the pattern should contain two occurrences of the escape character followed by a double quote (\"). The text matching the portion of the pattern between these separators is returned when the match is successful.","description_html":"As with \u003ccode class=\"literal\"\u003eSIMILAR TO\u003c/code\u003e, the specified pattern must match the entire data string, or else the function fails and returns null. To indicate the part of the pattern for which the matching data sub-string is of interest, the pattern should contain two occurrences of the escape character followed by a double quote (\u003ccode class=\"literal\"\u003e\"\u003c/code\u003e). The text matching the portion of the pattern between these separators is returned when the match is successful.","description_zh":"与 SIMILAR TO 一样，指定的模式必须匹配整个数据字符串，否则函数失败并返回空值。为了指明要提取的子字符串所对应的模式部分，模式中应包含两个分隔符，每个分隔符都由转义字符后跟双引号（\"）组成。匹配成功时，返回与这两个分隔符之间的模式部分匹配的文本。","description_zh_html":"与 \u003ccode class=\"literal\"\u003eSIMILAR TO\u003c/code\u003e 一样，指定的模式必须匹配整个数据字符串，否则函数失败并返回空值。为了指明要提取的子字符串所对应的模式部分，模式中应包含两个分隔符，每个分隔符都由转义字符后跟双引号（\u003ccode class=\"literal\"\u003e\"\u003c/code\u003e）组成。匹配成功时，返回与这两个分隔符之间的模式部分匹配的文本。","examples":[],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e(\u003cem class=\"replaceable\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e, \u003cem class=\"replaceable\"\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e, \u003cem class=\"replaceable\"\u003e\u003ccode\u003eescape-character\u003c/code\u003e\u003c/em\u003e)","returns":"","text":"substring(string, pattern, escape-character)","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-SQL","file":"functions-string.html","sha256":"dbe9f91e55c35969d99a8d2697b6f7bd5388a24ccc2b89706a666f176025f1e2","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"substring","SourceDatabase":"center","Version":"18","Locale":"en","Title":"substring","Summary":"Extracts the substring of string starting at the start'th character if that is specified, and stopping after count characters if that is specified. Provide at least one of start and count.","BodyHTML":"Extracts the substring of \u003cem\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e starting at the \u003cem\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e\u0026#39;th character if that is specified, and stopping after \u003cem\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e characters if that is specified. Provide at least one of \u003cem\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e and \u003cem\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e.","SourceRevision":"wiki-repair-20261023:28b204fb9ed2c138153901739cd98a981867b03c8737a3d38c32e21f8867ba22","ContentHash":"0ee0471db01de9642e613883d8120807d813d31c05719f76223bffe05dfedd63","Payload":{"description":"Extracts the substring of string starting at the start'th character if that is specified, and stopping after count characters if that is specified. Provide at least one of start and count.","description_html":"Extracts the substring of \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e starting at the \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e'th character if that is specified, and stopping after \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e characters if that is specified. Provide at least one of \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e.","signatures":[{"description":"Extracts the substring of string starting at the start'th character if that is specified, and stopping after count characters if that is specified. Provide at least one of start and count.","description_html":"Extracts the substring of \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e starting at the \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e'th character if that is specified, and stopping after \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e characters if that is specified. Provide at least one of \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e.","description_zh":"提取 string 的子字符串：若指定了起始位置，则从第 start 个字符开始；若指定了长度，则在提取 count 个字符后停止。start 和 count 至少需要指定一个。","description_zh_html":"提取 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 的子字符串：若指定了起始位置，则从第 \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e 个字符开始；若指定了长度，则在提取 \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e 个字符后停止。\u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e 和 \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e 至少需要指定一个。","examples":[{"expr":"substring('Thomas' from 2 for 3)","result":"hom"},{"expr":"substring('Thomas' from 3)","result":"omas"},{"expr":"substring('Thomas' for 2)","result":"Th"}],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e [\u003cspan class=\"optional\"\u003e\u003ccode class=\"literal\"\u003eFROM\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e\u003c/span\u003e] [\u003cspan class=\"optional\"\u003e\u003ccode class=\"literal\"\u003eFOR\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"substring ( string text [FROM start integer] [FOR count integer] ) → text","zh_from":"same-version-manual"},{"description":"Extracts the first substring matching POSIX regular expression; see Section 9.7.3.","description_html":"Extracts the first substring matching POSIX regular expression; see \u003ca href=\"/docs/18/functions-matching.html#FUNCTIONS-POSIX-REGEXP\" title=\"9.7.3. POSIX Regular Expressions\"\u003eSection 9.7.3\u003c/a\u003e.","description_zh":"提取匹配 POSIX 正则表达式的第一个子字符串；参见第 9.7.3 节。","description_zh_html":"提取匹配 POSIX 正则表达式的第一个子字符串；参见\u003ca href=\"/docs/18/functions-matching.html#FUNCTIONS-POSIX-REGEXP\" title=\"9.7.3. POSIX正则表达式\"\u003e第 9.7.3 节\u003c/a\u003e。","examples":[{"expr":"substring('Thomas' from '...$')","result":"mas"}],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e \u003ccode class=\"literal\"\u003eFROM\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"substring ( string text FROM pattern text ) → text","zh_from":"same-version-manual"},{"description":"Extracts the first substring matching SQL regular expression; see Section 9.7.2. The first form has been specified since SQL:2003; the second form was only in SQL:1999 and should be considered obsolete.","description_html":"Extracts the first substring matching SQL regular expression; see \u003ca href=\"/docs/18/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP\" title=\"9.7.2. SIMILAR TO Regular Expressions\"\u003eSection 9.7.2\u003c/a\u003e. The first form has been specified since SQL:2003; the second form was only in SQL:1999 and should be considered obsolete.","description_zh":"提取匹配 SQL 正则表达式的第一个子字符串；参见第 9.7.2 节。第一种形式自 SQL:2003 起由标准规定；第二种形式只出现在 SQL:1999 中，应视为已过时。","description_zh_html":"提取匹配 SQL 正则表达式的第一个子字符串；参见\u003ca href=\"/docs/18/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP\" title=\"9.7.2. SIMILAR TO正则表达式\"\u003e第 9.7.2 节\u003c/a\u003e。第一种形式自 SQL:2003 起由标准规定；第二种形式只出现在 SQL:1999 中，应视为已过时。","examples":[{"expr":"substring('Thomas' similar '%#\"o_a#\"_' escape '#')","result":"oma"}],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e \u003ccode class=\"literal\"\u003eSIMILAR\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e \u003ccode class=\"literal\"\u003eESCAPE\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003eescape\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"substring ( string text SIMILAR pattern text ESCAPE escape text ) → text","zh_from":"same-version-manual"},{"description":"Extracts the first substring matching SQL regular expression; see Section 9.7.2. The first form has been specified since SQL:2003; the second form was only in SQL:1999 and should be considered obsolete.","description_html":"Extracts the first substring matching SQL regular expression; see \u003ca href=\"/docs/18/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP\" title=\"9.7.2. SIMILAR TO Regular Expressions\"\u003eSection 9.7.2\u003c/a\u003e. The first form has been specified since SQL:2003; the second form was only in SQL:1999 and should be considered obsolete.","description_zh":"提取匹配 SQL 正则表达式的第一个子字符串；参见第 9.7.2 节。第一种形式自 SQL:2003 起由标准规定；第二种形式只出现在 SQL:1999 中，应视为已过时。","description_zh_html":"提取匹配 SQL 正则表达式的第一个子字符串；参见\u003ca href=\"/docs/18/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP\" title=\"9.7.2. SIMILAR TO正则表达式\"\u003e第 9.7.2 节\u003c/a\u003e。第一种形式自 SQL:2003 起由标准规定；第二种形式只出现在 SQL:1999 中，应视为已过时。","examples":[{"expr":"substring('Thomas' similar '%#\"o_a#\"_' escape '#')","result":"oma"}],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e \u003ccode class=\"literal\"\u003eFROM\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e \u003ccode class=\"literal\"\u003eFOR\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003eescape\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"substring ( string text FROM pattern text FOR escape text ) → text","zh_from":"same-version-manual"},{"description":"Extracts the substring of bytes starting at the start'th byte if that is specified, and stopping after count bytes if that is specified. Provide at least one of start and count.","description_html":"Extracts the substring of \u003cem class=\"parameter\"\u003e\u003ccode\u003ebytes\u003c/code\u003e\u003c/em\u003e starting at the \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e'th byte if that is specified, and stopping after \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e bytes if that is specified. Provide at least one of \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e.","description_zh":"提取 bytes 的子字符串：若指定了起始位置，则从第 start 个字节开始；若指定了长度，则在提取 count 个字节后停止。start 和 count 至少需要指定一个。","description_zh_html":"提取 \u003cem class=\"parameter\"\u003e\u003ccode\u003ebytes\u003c/code\u003e\u003c/em\u003e 的子字符串：若指定了起始位置，则从第 \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e 个字节开始；若指定了长度，则在提取 \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e 个字节后停止。\u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e 和 \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e 至少需要指定一个。","examples":[{"expr":"substring('\\x1234567890'::bytea from 3 for 2)","result":"\\x5678"}],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003ebytes\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ebytea\u003c/code\u003e [\u003cspan class=\"optional\"\u003e\u003ccode class=\"literal\"\u003eFROM\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e\u003c/span\u003e] [\u003cspan class=\"optional\"\u003e\u003ccode class=\"literal\"\u003eFOR\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003ebytea\u003c/code\u003e","returns":"bytea","text":"substring ( bytes bytea [FROM start integer] [FOR count integer] ) → bytea","zh_from":"same-version-manual"},{"description":"Extracts the substring of bits starting at the start'th bit if that is specified, and stopping after count bits if that is specified. Provide at least one of start and count.","description_html":"Extracts the substring of \u003cem class=\"parameter\"\u003e\u003ccode\u003ebits\u003c/code\u003e\u003c/em\u003e starting at the \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e'th bit if that is specified, and stopping after \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e bits if that is specified. Provide at least one of \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e.","description_zh":"提取 bits 的子串：若指定了起始位置，则从第 start 位开始；若指定了长度，则在提取 count 位后停止。start 和 count 至少需要指定一个。","description_zh_html":"提取 \u003cem class=\"parameter\"\u003e\u003ccode\u003ebits\u003c/code\u003e\u003c/em\u003e 的子串：若指定了起始位置，则从第 \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e 位开始；若指定了长度，则在提取 \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e 位后停止。\u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e 和 \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e 至少需要指定一个。","examples":[{"expr":"substring(B'110010111111' from 3 for 2)","result":"00"}],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003ebits\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ebit\u003c/code\u003e [\u003cspan class=\"optional\"\u003e\u003ccode class=\"literal\"\u003eFROM\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e\u003c/span\u003e] [\u003cspan class=\"optional\"\u003e\u003ccode class=\"literal\"\u003eFOR\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003ebit\u003c/code\u003e","returns":"bit","text":"substring ( bits bit [FROM start integer] [FOR count integer] ) → bit","zh_from":"same-version-manual"},{"description":"The substring function with three parameters provides extraction of a substring that matches an SQL regular expression pattern. The function can be written according to standard SQL syntax:","description_html":"The \u003ccode class=\"function\"\u003esubstring\u003c/code\u003e function with three parameters provides extraction of a substring that matches an SQL regular expression pattern. The function can be written according to standard SQL syntax:","description_zh":"带有三个参数的 substring 函数可以提取匹配 SQL 正则表达式模式的子字符串。该函数可以按照标准 SQL 语法书写：","description_zh_html":"带有三个参数的 \u003ccode class=\"function\"\u003esubstring\u003c/code\u003e 函数可以提取匹配 SQL 正则表达式模式的子字符串。该函数可以按照标准 SQL 语法书写：","examples":[],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e(\u003cem class=\"replaceable\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e similar \u003cem class=\"replaceable\"\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e escape \u003cem class=\"replaceable\"\u003e\u003ccode\u003eescape-character\u003c/code\u003e\u003c/em\u003e)","returns":"","text":"substring(string similar pattern escape escape-character)","zh_from":"same-version-manual"},{"description":"The substring function with three parameters provides extraction of a substring that matches an SQL regular expression pattern. The function can be written according to standard SQL syntax:","description_html":"The \u003ccode class=\"function\"\u003esubstring\u003c/code\u003e function with three parameters provides extraction of a substring that matches an SQL regular expression pattern. The function can be written according to standard SQL syntax:","description_zh":"带有三个参数的 substring 函数可以提取匹配 SQL 正则表达式模式的子字符串。该函数可以按照标准 SQL 语法书写：","description_zh_html":"带有三个参数的 \u003ccode class=\"function\"\u003esubstring\u003c/code\u003e 函数可以提取匹配 SQL 正则表达式模式的子字符串。该函数可以按照标准 SQL 语法书写：","examples":[],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e(\u003cem class=\"replaceable\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e from \u003cem class=\"replaceable\"\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e for \u003cem class=\"replaceable\"\u003e\u003ccode\u003eescape-character\u003c/code\u003e\u003c/em\u003e)","returns":"","text":"substring(string from pattern for escape-character)","zh_from":"same-version-manual"},{"description":"As with SIMILAR TO, the specified pattern must match the entire data string, or else the function fails and returns null. To indicate the part of the pattern for which the matching data sub-string is of interest, the pattern should contain two occurrences of the escape character followed by a double quote (\"). The text matching the portion of the pattern between these separators is returned when the match is successful.","description_html":"As with \u003ccode class=\"literal\"\u003eSIMILAR TO\u003c/code\u003e, the specified pattern must match the entire data string, or else the function fails and returns null. To indicate the part of the pattern for which the matching data sub-string is of interest, the pattern should contain two occurrences of the escape character followed by a double quote (\u003ccode class=\"literal\"\u003e\"\u003c/code\u003e). The text matching the portion of the pattern between these separators is returned when the match is successful.","description_zh":"与 SIMILAR TO 一样，指定的模式必须匹配整个数据字符串，否则函数失败并返回空值。为了指明要提取的子字符串所对应的模式部分，模式中应包含两个分隔符，每个分隔符都由转义字符后跟双引号（\"）组成。匹配成功时，返回与这两个分隔符之间的模式部分匹配的文本。","description_zh_html":"与 \u003ccode class=\"literal\"\u003eSIMILAR TO\u003c/code\u003e 一样，指定的模式必须匹配整个数据字符串，否则函数失败并返回空值。为了指明要提取的子字符串所对应的模式部分，模式中应包含两个分隔符，每个分隔符都由转义字符后跟双引号（\u003ccode class=\"literal\"\u003e\"\u003c/code\u003e）组成。匹配成功时，返回与这两个分隔符之间的模式部分匹配的文本。","examples":[],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e(\u003cem class=\"replaceable\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e, \u003cem class=\"replaceable\"\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e, \u003cem class=\"replaceable\"\u003e\u003ccode\u003eescape-character\u003c/code\u003e\u003c/em\u003e)","returns":"","text":"substring(string, pattern, escape-character)","zh_from":"same-version-manual"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.1","7.2","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":"83de03643e17bab25c749c1ec082006dcfe253bff12d7afe661e9881924b16e9","Text":"substring ( string text [FROM start integer] [FOR count integer] ) → text","Returns":"text","Payload":{"description":"Extracts the substring of string starting at the start'th character if that is specified, and stopping after count characters if that is specified. Provide at least one of start and count.","description_html":"Extracts the substring of \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e starting at the \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e'th character if that is specified, and stopping after \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e characters if that is specified. Provide at least one of \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e.","description_zh":"提取 string 的子字符串：若指定了起始位置，则从第 start 个字符开始；若指定了长度，则在提取 count 个字符后停止。start 和 count 至少需要指定一个。","description_zh_html":"提取 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 的子字符串：若指定了起始位置，则从第 \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e 个字符开始；若指定了长度，则在提取 \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e 个字符后停止。\u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e 和 \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e 至少需要指定一个。","examples":[{"expr":"substring('Thomas' from 2 for 3)","result":"hom"},{"expr":"substring('Thomas' from 3)","result":"omas"},{"expr":"substring('Thomas' for 2)","result":"Th"}],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e [\u003cspan class=\"optional\"\u003e\u003ccode class=\"literal\"\u003eFROM\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e\u003c/span\u003e] [\u003cspan class=\"optional\"\u003e\u003ccode class=\"literal\"\u003eFOR\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"substring ( string text [FROM start integer] [FOR count integer] ) → text","zh_from":"same-version-manual"}},{"Version":"18","Ordinal":1,"Hash":"fdd18ddc93355b456ec7db6ebd4c1169b1ead563df81a03ece86e4604a71cab1","Text":"substring ( string text FROM pattern text ) → text","Returns":"text","Payload":{"description":"Extracts the first substring matching POSIX regular expression; see Section 9.7.3.","description_html":"Extracts the first substring matching POSIX regular expression; see \u003ca href=\"/docs/18/functions-matching.html#FUNCTIONS-POSIX-REGEXP\" title=\"9.7.3. POSIX Regular Expressions\"\u003eSection 9.7.3\u003c/a\u003e.","description_zh":"提取匹配 POSIX 正则表达式的第一个子字符串；参见第 9.7.3 节。","description_zh_html":"提取匹配 POSIX 正则表达式的第一个子字符串；参见\u003ca href=\"/docs/18/functions-matching.html#FUNCTIONS-POSIX-REGEXP\" title=\"9.7.3. POSIX正则表达式\"\u003e第 9.7.3 节\u003c/a\u003e。","examples":[{"expr":"substring('Thomas' from '...$')","result":"mas"}],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e \u003ccode class=\"literal\"\u003eFROM\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"substring ( string text FROM pattern text ) → text","zh_from":"same-version-manual"}},{"Version":"18","Ordinal":2,"Hash":"c6f09c8524d4f1933aaa3add69203f2e255962f29574decf15b4d61a713c0ea6","Text":"substring ( string text SIMILAR pattern text ESCAPE escape text ) → text","Returns":"text","Payload":{"description":"Extracts the first substring matching SQL regular expression; see Section 9.7.2. The first form has been specified since SQL:2003; the second form was only in SQL:1999 and should be considered obsolete.","description_html":"Extracts the first substring matching SQL regular expression; see \u003ca href=\"/docs/18/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP\" title=\"9.7.2. SIMILAR TO Regular Expressions\"\u003eSection 9.7.2\u003c/a\u003e. The first form has been specified since SQL:2003; the second form was only in SQL:1999 and should be considered obsolete.","description_zh":"提取匹配 SQL 正则表达式的第一个子字符串；参见第 9.7.2 节。第一种形式自 SQL:2003 起由标准规定；第二种形式只出现在 SQL:1999 中，应视为已过时。","description_zh_html":"提取匹配 SQL 正则表达式的第一个子字符串；参见\u003ca href=\"/docs/18/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP\" title=\"9.7.2. SIMILAR TO正则表达式\"\u003e第 9.7.2 节\u003c/a\u003e。第一种形式自 SQL:2003 起由标准规定；第二种形式只出现在 SQL:1999 中，应视为已过时。","examples":[{"expr":"substring('Thomas' similar '%#\"o_a#\"_' escape '#')","result":"oma"}],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e \u003ccode class=\"literal\"\u003eSIMILAR\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e \u003ccode class=\"literal\"\u003eESCAPE\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003eescape\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"substring ( string text SIMILAR pattern text ESCAPE escape text ) → text","zh_from":"same-version-manual"}},{"Version":"18","Ordinal":3,"Hash":"8e77a1faad253581e9a8b8ec573c77ab2e80479cd8ff84a1f2a935e480d88797","Text":"substring ( string text FROM pattern text FOR escape text ) → text","Returns":"text","Payload":{"description":"Extracts the first substring matching SQL regular expression; see Section 9.7.2. The first form has been specified since SQL:2003; the second form was only in SQL:1999 and should be considered obsolete.","description_html":"Extracts the first substring matching SQL regular expression; see \u003ca href=\"/docs/18/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP\" title=\"9.7.2. SIMILAR TO Regular Expressions\"\u003eSection 9.7.2\u003c/a\u003e. The first form has been specified since SQL:2003; the second form was only in SQL:1999 and should be considered obsolete.","description_zh":"提取匹配 SQL 正则表达式的第一个子字符串；参见第 9.7.2 节。第一种形式自 SQL:2003 起由标准规定；第二种形式只出现在 SQL:1999 中，应视为已过时。","description_zh_html":"提取匹配 SQL 正则表达式的第一个子字符串；参见\u003ca href=\"/docs/18/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP\" title=\"9.7.2. SIMILAR TO正则表达式\"\u003e第 9.7.2 节\u003c/a\u003e。第一种形式自 SQL:2003 起由标准规定；第二种形式只出现在 SQL:1999 中，应视为已过时。","examples":[{"expr":"substring('Thomas' similar '%#\"o_a#\"_' escape '#')","result":"oma"}],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e \u003ccode class=\"literal\"\u003eFROM\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e \u003ccode class=\"literal\"\u003eFOR\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003eescape\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"substring ( string text FROM pattern text FOR escape text ) → text","zh_from":"same-version-manual"}},{"Version":"18","Ordinal":4,"Hash":"39a91c0e54d0f2e56827b5273fc0ea6574fd0d70e3268715d755ed2cc39016cd","Text":"substring ( bytes bytea [FROM start integer] [FOR count integer] ) → bytea","Returns":"bytea","Payload":{"description":"Extracts the substring of bytes starting at the start'th byte if that is specified, and stopping after count bytes if that is specified. Provide at least one of start and count.","description_html":"Extracts the substring of \u003cem class=\"parameter\"\u003e\u003ccode\u003ebytes\u003c/code\u003e\u003c/em\u003e starting at the \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e'th byte if that is specified, and stopping after \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e bytes if that is specified. Provide at least one of \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e.","description_zh":"提取 bytes 的子字符串：若指定了起始位置，则从第 start 个字节开始；若指定了长度，则在提取 count 个字节后停止。start 和 count 至少需要指定一个。","description_zh_html":"提取 \u003cem class=\"parameter\"\u003e\u003ccode\u003ebytes\u003c/code\u003e\u003c/em\u003e 的子字符串：若指定了起始位置，则从第 \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e 个字节开始；若指定了长度，则在提取 \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e 个字节后停止。\u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e 和 \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e 至少需要指定一个。","examples":[{"expr":"substring('\\x1234567890'::bytea from 3 for 2)","result":"\\x5678"}],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003ebytes\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ebytea\u003c/code\u003e [\u003cspan class=\"optional\"\u003e\u003ccode class=\"literal\"\u003eFROM\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e\u003c/span\u003e] [\u003cspan class=\"optional\"\u003e\u003ccode class=\"literal\"\u003eFOR\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003ebytea\u003c/code\u003e","returns":"bytea","text":"substring ( bytes bytea [FROM start integer] [FOR count integer] ) → bytea","zh_from":"same-version-manual"}},{"Version":"18","Ordinal":5,"Hash":"94cc35df4f293d8321a4c7ec6940ff28e17f70d73251c85835d3dfbfeba851e2","Text":"substring ( bits bit [FROM start integer] [FOR count integer] ) → bit","Returns":"bit","Payload":{"description":"Extracts the substring of bits starting at the start'th bit if that is specified, and stopping after count bits if that is specified. Provide at least one of start and count.","description_html":"Extracts the substring of \u003cem class=\"parameter\"\u003e\u003ccode\u003ebits\u003c/code\u003e\u003c/em\u003e starting at the \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e'th bit if that is specified, and stopping after \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e bits if that is specified. Provide at least one of \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e.","description_zh":"提取 bits 的子串：若指定了起始位置，则从第 start 位开始；若指定了长度，则在提取 count 位后停止。start 和 count 至少需要指定一个。","description_zh_html":"提取 \u003cem class=\"parameter\"\u003e\u003ccode\u003ebits\u003c/code\u003e\u003c/em\u003e 的子串：若指定了起始位置，则从第 \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e 位开始；若指定了长度，则在提取 \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e 位后停止。\u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e 和 \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e 至少需要指定一个。","examples":[{"expr":"substring(B'110010111111' from 3 for 2)","result":"00"}],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003ebits\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ebit\u003c/code\u003e [\u003cspan class=\"optional\"\u003e\u003ccode class=\"literal\"\u003eFROM\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e\u003c/span\u003e] [\u003cspan class=\"optional\"\u003e\u003ccode class=\"literal\"\u003eFOR\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003ecount\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003ebit\u003c/code\u003e","returns":"bit","text":"substring ( bits bit [FROM start integer] [FOR count integer] ) → bit","zh_from":"same-version-manual"}},{"Version":"18","Ordinal":6,"Hash":"180d5d7caedfa2bbf1eebe6c92ec8c57e9bdf7bb2c9134821ecac8092aa2be40","Text":"substring(string similar pattern escape escape-character)","Returns":"","Payload":{"description":"The substring function with three parameters provides extraction of a substring that matches an SQL regular expression pattern. The function can be written according to standard SQL syntax:","description_html":"The \u003ccode class=\"function\"\u003esubstring\u003c/code\u003e function with three parameters provides extraction of a substring that matches an SQL regular expression pattern. The function can be written according to standard SQL syntax:","description_zh":"带有三个参数的 substring 函数可以提取匹配 SQL 正则表达式模式的子字符串。该函数可以按照标准 SQL 语法书写：","description_zh_html":"带有三个参数的 \u003ccode class=\"function\"\u003esubstring\u003c/code\u003e 函数可以提取匹配 SQL 正则表达式模式的子字符串。该函数可以按照标准 SQL 语法书写：","examples":[],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e(\u003cem class=\"replaceable\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e similar \u003cem class=\"replaceable\"\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e escape \u003cem class=\"replaceable\"\u003e\u003ccode\u003eescape-character\u003c/code\u003e\u003c/em\u003e)","returns":"","text":"substring(string similar pattern escape escape-character)","zh_from":"same-version-manual"}},{"Version":"18","Ordinal":7,"Hash":"d780393aefc5597689e87642619f86a34c720cc046bfd3bdef5f6dca05641386","Text":"substring(string from pattern for escape-character)","Returns":"","Payload":{"description":"The substring function with three parameters provides extraction of a substring that matches an SQL regular expression pattern. The function can be written according to standard SQL syntax:","description_html":"The \u003ccode class=\"function\"\u003esubstring\u003c/code\u003e function with three parameters provides extraction of a substring that matches an SQL regular expression pattern. The function can be written according to standard SQL syntax:","description_zh":"带有三个参数的 substring 函数可以提取匹配 SQL 正则表达式模式的子字符串。该函数可以按照标准 SQL 语法书写：","description_zh_html":"带有三个参数的 \u003ccode class=\"function\"\u003esubstring\u003c/code\u003e 函数可以提取匹配 SQL 正则表达式模式的子字符串。该函数可以按照标准 SQL 语法书写：","examples":[],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e(\u003cem class=\"replaceable\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e from \u003cem class=\"replaceable\"\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e for \u003cem class=\"replaceable\"\u003e\u003ccode\u003eescape-character\u003c/code\u003e\u003c/em\u003e)","returns":"","text":"substring(string from pattern for escape-character)","zh_from":"same-version-manual"}},{"Version":"18","Ordinal":8,"Hash":"147a1811cb78735c7a94161ae15a495b596c166d4b169ff27400e58dc1f94ad6","Text":"substring(string, pattern, escape-character)","Returns":"","Payload":{"description":"As with SIMILAR TO, the specified pattern must match the entire data string, or else the function fails and returns null. To indicate the part of the pattern for which the matching data sub-string is of interest, the pattern should contain two occurrences of the escape character followed by a double quote (\"). The text matching the portion of the pattern between these separators is returned when the match is successful.","description_html":"As with \u003ccode class=\"literal\"\u003eSIMILAR TO\u003c/code\u003e, the specified pattern must match the entire data string, or else the function fails and returns null. To indicate the part of the pattern for which the matching data sub-string is of interest, the pattern should contain two occurrences of the escape character followed by a double quote (\u003ccode class=\"literal\"\u003e\"\u003c/code\u003e). The text matching the portion of the pattern between these separators is returned when the match is successful.","description_zh":"与 SIMILAR TO 一样，指定的模式必须匹配整个数据字符串，否则函数失败并返回空值。为了指明要提取的子字符串所对应的模式部分，模式中应包含两个分隔符，每个分隔符都由转义字符后跟双引号（\"）组成。匹配成功时，返回与这两个分隔符之间的模式部分匹配的文本。","description_zh_html":"与 \u003ccode class=\"literal\"\u003eSIMILAR TO\u003c/code\u003e 一样，指定的模式必须匹配整个数据字符串，否则函数失败并返回空值。为了指明要提取的子字符串所对应的模式部分，模式中应包含两个分隔符，每个分隔符都由转义字符后跟双引号（\u003ccode class=\"literal\"\u003e\"\u003c/code\u003e）组成。匹配成功时，返回与这两个分隔符之间的模式部分匹配的文本。","examples":[],"html":"\u003ccode class=\"function\"\u003esubstring\u003c/code\u003e(\u003cem class=\"replaceable\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e, \u003cem class=\"replaceable\"\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e, \u003cem class=\"replaceable\"\u003e\u003ccode\u003eescape-character\u003c/code\u003e\u003c/em\u003e)","returns":"","text":"substring(string, pattern, escape-character)","zh_from":"same-version-manual"}}],"Spellings":null,"SQLState":null,"Evidence":null}
