version.ts14 lines · main
| 1 | import { safeSql } from '../pg-format' |
| 2 | |
| 3 | export const VERSION_SQL = /* SQL */ safeSql` |
| 4 | select |
| 5 | version(), |
| 6 | current_setting('server_version_num')::int8 as version_number, |
| 7 | ( |
| 8 | select |
| 9 | count(*) as active_connections |
| 10 | from |
| 11 | pg_stat_activity |
| 12 | ) as active_connections, |
| 13 | current_setting('max_connections')::int8 as max_connections |
| 14 | ` |