Changeset: ced293cc1802 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/ced293cc1802 Added Files: sql/scripts/47_regexp.sql Modified Files: sql/backends/monet5/CMakeLists.txt Branch: default Log Message:
Adds sys functions regexp_replace based on pcre regexp diffs (34 lines): diff --git a/sql/backends/monet5/CMakeLists.txt b/sql/backends/monet5/CMakeLists.txt --- a/sql/backends/monet5/CMakeLists.txt +++ b/sql/backends/monet5/CMakeLists.txt @@ -98,6 +98,7 @@ set(include_sql_files 42_md5sum 45_uuid 46_profiler + 47_regexp 52_describe 58_hot_snapshot 75_storagemodel diff --git a/sql/scripts/47_regexp.sql b/sql/scripts/47_regexp.sql new file mode 100644 --- /dev/null +++ b/sql/scripts/47_regexp.sql @@ -0,0 +1,18 @@ +-- This Source Code Form is subject to the terms of the Mozilla Public +-- License, v. 2.0. If a copy of the MPL was not distributed with this +-- file, You can obtain one at http://mozilla.org/MPL/2.0/. +-- +-- Copyright 1997 - July 2008 CWI, August 2008 - 2022 MonetDB B.V. + +create function sys.regexp_replace(ori string, pat string, rep string, flg string) +returns string external name pcre.replace; + +grant execute on function regexp_replace(string, string, string, string) to public; + +create function sys.regexp_replace(ori string, pat string, rep string) +returns string +begin + return sys.regexp_replace(ori, pat, rep, ''); +end; + +grant execute on function regexp_replace(string, string, string) to public; _______________________________________________ checkin-list mailing list -- [email protected] To unsubscribe send an email to [email protected]
