[physical][postgresql] concat
→||
operator (#2945)
Use `||` standard concatenation instead of the `concat` function in order to use the `vault_kv_store` index on `parent_path`.
This commit is contained in:
parent
711d6e6569
commit
27ca1c40c2
|
@ -72,7 +72,7 @@ func newPostgreSQLBackend(conf map[string]string, logger log.Logger) (Backend, e
|
|||
delete_query: "DELETE FROM " + quoted_table + " WHERE path = $1 AND key = $2",
|
||||
list_query: "SELECT key FROM " + quoted_table + " WHERE path = $1" +
|
||||
"UNION SELECT DISTINCT substring(substr(path, length($1)+1) from '^.*?/') FROM " +
|
||||
quoted_table + " WHERE parent_path LIKE concat($1, '%')",
|
||||
quoted_table + " WHERE parent_path LIKE $1 || '%'",
|
||||
logger: logger,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue