Skip to content

Commit 2b4b32b

Browse files
committed
support rsync in extract_schema
1 parent 5b4dc75 commit 2b4b32b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/functions/extract_schema.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace duckdb
3030
// | - OR
3131
// (mailto|sms|tel) - Capturing group for other protocols (mailto, sms, tel)
3232
// :[^/] - Matches ":" followed by any character except "/"
33-
std::regex schema_regex (R"(^(http|https|ftp):\/\/|^(mailto|sms|tel):[^/])");
33+
std::regex schema_regex (R"(^(http|https|ftp|rsync):\/\/|^(mailto|sms|tel):[^/])");
3434
std::smatch schema_match;
3535

3636
// Use regex_search to find the schema component in the input string

test/sql/extract_schema.test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,13 @@ SELECT extract_schema('ftp:/example.com');
9595
----
9696
(empty)
9797

98+
# ---------------------------- RSYNC ----------------------------
99+
100+
query I
101+
SELECT extract_schema('rsync://rpki.example.com');
102+
----
103+
rsync
104+
98105
# ---------------------------- TEL ----------------------------
99106

100107
query I

0 commit comments

Comments
 (0)