Sfoglia il codice sorgente

Merge pull request #14313 from dhenneke/postgres-use-table-not-schema-constraint

Improve PostgreSQL Query Editor if using different Schemas
Marcus Efraimsson 7 anni fa
parent
commit
093c9425e9
1 ha cambiato i file con 1 aggiunte e 2 eliminazioni
  1. 1 2
      public/app/plugins/datasource/postgres/meta_query.ts

+ 1 - 2
public/app/plugins/datasource/postgres/meta_query.ts

@@ -151,8 +151,7 @@ table_schema IN (
 
   buildDatatypeQuery(column: string) {
     let query = 'SELECT udt_name FROM information_schema.columns WHERE ';
-    query += this.buildSchemaConstraint();
-    query += ' AND table_name = ' + this.quoteIdentAsLiteral(this.target.table);
+    query += this.buildTableConstraint(this.target.table);
     query += ' AND column_name = ' + this.quoteIdentAsLiteral(column);
     return query;
   }