This is an automated email from the ASF dual-hosted git repository.
zclll pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push:
new ee0998813d6 [Feature](function) Support alias INSERT for OVERLAY
(#3018)
ee0998813d6 is described below
commit ee0998813d64fb1a76aa47ef25a61db80aaba6d8
Author: linrrarity <[email protected]>
AuthorDate: Fri Oct 31 18:21:35 2025 +0800
[Feature](function) Support alias INSERT for OVERLAY (#3018)
## Versions
- [x] dev
- [ ] 3.x
- [ ] 2.1
- [ ] 2.0
## Languages
- [x] Chinese
- [x] English
## Docs Checklist
- [ ] Checked by AI
- [ ] Test Cases Built
---
.../scalar-functions/string-functions/overlay.md | 19 ++++++++++++++++++-
.../scalar-functions/string-functions/overlay.md | 18 +++++++++++++++++-
2 files changed, 35 insertions(+), 2 deletions(-)
diff --git
a/docs/sql-manual/sql-functions/scalar-functions/string-functions/overlay.md
b/docs/sql-manual/sql-functions/scalar-functions/string-functions/overlay.md
index bdad6ab244f..6502f703240 100644
--- a/docs/sql-manual/sql-functions/scalar-functions/string-functions/overlay.md
+++ b/docs/sql-manual/sql-functions/scalar-functions/string-functions/overlay.md
@@ -7,7 +7,13 @@
## Description
-The OVERLAY function is used to replace a substring at a specified position
and length within a string. Starting from the specified position, it replaces
the specified length of characters with a new string.
+The OVERLAY function is used to replace a substring at a specified position
and length within a string. Starting from the specified position, it replaces
the specified length of characters with a new string.This function is multibyte
safe.
+
+This function behaves consistently with the [INSERT
function](https://dev.mysql.com/doc/refman/8.4/en/string-functions.html#function_insert)
in MySQL.
+
+## Alias
+
+- INSERT
## Syntax
@@ -82,3 +88,14 @@ SELECT overlay('Hello', NULL, 2, 'X');
| NULL |
+--------------------------------+
```
+
+```sql
+SELECT INSERT('🎉🎊🎈', 2, 1, '🎁');
+```
+```text
++--------------------------------------+
+| INSERT('🎉🎊🎈', 2, 1, '🎁') |
++--------------------------------------+
+| 🎉🎁🎈 |
++--------------------------------------+
+```
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/string-functions/overlay.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/string-functions/overlay.md
index d9c1ddc1722..7478597bc9a 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/string-functions/overlay.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/string-functions/overlay.md
@@ -7,7 +7,12 @@
## 描述
-OVERLAY 函数用于替换字符串中指定位置和长度的子串。从指定位置开始,用新字符串替换指定长度的字符。
+OVERLAY 函数用于替换字符串中指定位置和长度的子串。从指定位置开始,用新字符串替换指定长度的字符。此函数支持多字节字符。
+
+此函数行为与 MySQL 中的 [INSERT
函数](https://dev.mysql.com/doc/refman/8.4/en/string-functions.html#function_insert)行为一致。
+
+## 别名
+- INSERT
## 语法
@@ -82,3 +87,14 @@ SELECT overlay('Hello', NULL, 2, 'X');
| NULL |
+--------------------------------+
```
+
+```sql
+SELECT INSERT('🎉🎊🎈', 2, 1, '🎁');
+```
+```text
++--------------------------------------+
+| INSERT('🎉🎊🎈', 2, 1, '🎁') |
++--------------------------------------+
+| 🎉🎁🎈 |
++--------------------------------------+
+```
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]