Add locate -> position alias #3713

This commit is contained in:
Ivan Blinkov 2018-12-06 16:36:23 +03:00
parent 4ebbe3502d
commit ed04453122
3 changed files with 3 additions and 0 deletions

View File

@ -1088,6 +1088,7 @@ void registerFunctionsStringSearch(FunctionFactory & factory)
factory.registerFunction<FunctionLike>();
factory.registerFunction<FunctionNotLike>();
factory.registerFunction<FunctionExtract>();
factory.registerAlias("locate", NamePosition::name, FunctionFactory::CaseInsensitive);
factory.registerAlias("replace", NameReplaceAll::name, FunctionFactory::CaseInsensitive);
}
}

View File

@ -3,3 +3,4 @@ FOO
foo
FOO
baz
2

View File

@ -5,3 +5,4 @@ select ucase('foo');
select LOWER('Foo');
select UPPER('Foo');
select REPLACE('bar', 'r', 'z');
select Locate('foo', 'o');