mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Postgres: Return tables with hyphenated schemes (#45754)
* add basic test for buildSchemaConstraint function * wrap table schema in quote_ident function * fix type error in meta_query.test * swap test for inline comment * make comment more readable
This commit is contained in:
parent
c331af93b9
commit
52629fbc4e
@ -74,8 +74,9 @@ LIMIT 1
|
||||
}
|
||||
|
||||
buildSchemaConstraint() {
|
||||
// quote_ident protects hyphenated schemes
|
||||
const query = `
|
||||
table_schema IN (
|
||||
quote_ident(table_schema) IN (
|
||||
SELECT
|
||||
CASE WHEN trim(s[i]) = '"$user"' THEN user ELSE trim(s[i]) END
|
||||
FROM
|
||||
|
Loading…
Reference in New Issue
Block a user