mirror of
https://github.com/grafana/grafana.git
synced 2025-09-23 18:03:28 +08: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:
@ -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
|
||||
|
Reference in New Issue
Block a user