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:
matt abrams 2022-03-03 22:56:55 -10:00 committed by GitHub
parent c331af93b9
commit 52629fbc4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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