mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-25 22:25:59 +00:00
string_agg usage fix
This commit is contained in:
@@ -55,8 +55,8 @@ class Analyser extends DatabaseAnalyser {
|
|||||||
super(pool, driver, version);
|
super(pool, driver, version);
|
||||||
}
|
}
|
||||||
|
|
||||||
createQuery(resFileName, typeFields) {
|
createQuery(resFileName, typeFields, replacements = {}) {
|
||||||
const query = super.createQuery(sql[resFileName], typeFields);
|
const query = super.createQuery(sql[resFileName], typeFields, replacements);
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,7 +139,8 @@ class Analyser extends DatabaseAnalyser {
|
|||||||
|
|
||||||
this.feedback({ analysingMessage: 'Loading routines' });
|
this.feedback({ analysingMessage: 'Loading routines' });
|
||||||
const routines = await this.analyserQuery('routines', ['procedures', 'functions'], {
|
const routines = await this.analyserQuery('routines', ['procedures', 'functions'], {
|
||||||
$typeAgg: this.driver.dialect.stringAgg ? 'string_agg' : 'max',
|
$typeAggFunc: this.driver.dialect.stringAgg ? 'string_agg' : 'max',
|
||||||
|
$typeAggParam: this.driver.dialect.stringAgg ? ", '|'" : '',
|
||||||
});
|
});
|
||||||
|
|
||||||
this.feedback({ analysingMessage: 'Loading indexes' });
|
this.feedback({ analysingMessage: 'Loading indexes' });
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ select
|
|||||||
max(routine_definition) as "definition",
|
max(routine_definition) as "definition",
|
||||||
max(md5(routine_definition)) as "hash_code",
|
max(md5(routine_definition)) as "hash_code",
|
||||||
routine_type as "object_type",
|
routine_type as "object_type",
|
||||||
$typeAgg(data_type, '|') as "data_type",
|
$typeAggFunc(data_type $typeAggParam) as "data_type",
|
||||||
max(external_language) as "language"
|
max(external_language) as "language"
|
||||||
from
|
from
|
||||||
information_schema.routines where routine_schema != 'information_schema' and routine_schema != 'pg_catalog' and routine_schema !~ '^_timescaledb_'
|
information_schema.routines where routine_schema != 'information_schema' and routine_schema != 'pg_catalog' and routine_schema !~ '^_timescaledb_'
|
||||||
|
|||||||
Reference in New Issue
Block a user