better display of server version

This commit is contained in:
Jan Prochazka
2021-04-25 12:28:18 +02:00
parent d0cbd5d0a4
commit a8a9afc936
5 changed files with 38 additions and 13 deletions

View File

@@ -141,7 +141,10 @@ const driver = {
async getVersion(client) {
const { rows } = await this.query(client, 'SELECT version()');
const { version } = rows[0];
return { version };
return {
version,
versionText: (version || '').replace(/\s*\(.*$/, ''),
};
},
// async analyseFull(pool) {
// const analyser = new PostgreAnalyser(pool, this);