mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-27 10:20:38 +00:00
fix: ident value in set search_path (#6153)
* fix: ident value in set search_path * refactor: remove unneeded clone
This commit is contained in:
@@ -122,7 +122,11 @@ pub fn set_search_path(exprs: Vec<Expr>, ctx: QueryContextRef) -> Result<()> {
|
||||
match search_expr {
|
||||
Expr::Value(Value::SingleQuotedString(search_path))
|
||||
| Expr::Value(Value::DoubleQuotedString(search_path)) => {
|
||||
ctx.set_current_schema(&search_path.clone());
|
||||
ctx.set_current_schema(search_path);
|
||||
Ok(())
|
||||
}
|
||||
Expr::Identifier(Ident { value, .. }) => {
|
||||
ctx.set_current_schema(value);
|
||||
Ok(())
|
||||
}
|
||||
expr => NotSupportedSnafu {
|
||||
|
||||
Reference in New Issue
Block a user