mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
docs: add comment explaining select version() (#11376)
This commit is contained in:
parent
7b242e1698
commit
592251962d
@ -4157,6 +4157,12 @@ export class PostgresQueryRunner
|
||||
* Loads Postgres version.
|
||||
*/
|
||||
async getVersion(): Promise<string> {
|
||||
// we use `SELECT version()` instead of `SHOW server_version` or `SHOW server_version_num`
|
||||
// to maintain compatability with Amazon Redshift.
|
||||
//
|
||||
// see:
|
||||
// - https://github.com/typeorm/typeorm/pull/9319
|
||||
// - https://docs.aws.amazon.com/redshift/latest/dg/c_unsupported-postgresql-functions.html
|
||||
const result: [{ version: string }] = await this.query(
|
||||
`SELECT version()`,
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user