• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

typeorm / typeorm / 20883731116

10 Jan 2026 08:09PM UTC coverage: 80.886% (-0.005%) from 80.891%
20883731116

push

github

web-flow
feat: add support for installing additional postgres extensions (#11888)

27128 of 32972 branches covered (82.28%)

Branch coverage included in aggregate %.

52 of 72 new or added lines in 2 files covered. (72.22%)

1 existing line in 1 file now uncovered.

91609 of 113824 relevant lines covered (80.48%)

69531.05 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/driver/postgres/PostgresConnectionOptions.ts
1
import { BaseDataSourceOptions } from "../../data-source/BaseDataSourceOptions"
×
2
import { ReplicationMode } from "../types/ReplicationMode"
×
3
import { PostgresConnectionCredentialsOptions } from "./PostgresConnectionCredentialsOptions"
×
4

×
5
/**
×
6
 * Postgres-specific connection options.
×
7
 */
×
8
export interface PostgresConnectionOptions
×
9
    extends BaseDataSourceOptions, PostgresConnectionCredentialsOptions {
×
10
    /**
×
11
     * Database type.
×
12
     */
×
13
    readonly type: "postgres"
×
14

×
15
    /**
×
16
     * Schema name.
×
17
     */
×
18
    readonly schema?: string
×
19

×
20
    /**
×
21
     * The driver object
×
22
     * This defaults to `require("pg")`.
×
23
     */
×
24
    readonly driver?: any
×
25

×
26
    /**
×
27
     * The driver object
×
28
     * This defaults to `require("pg-native")`.
×
29
     */
×
30
    readonly nativeDriver?: any
×
31

×
32
    /**
×
33
     * A boolean determining whether to pass time values in UTC or local time. (default: false).
×
34
     */
×
35
    readonly useUTC?: boolean
×
36

×
37
    /**
×
38
     * Replication setup.
×
39
     */
×
40
    readonly replication?: {
×
41
        /**
×
42
         * Master server used by orm to perform writes.
×
43
         */
×
44
        readonly master: PostgresConnectionCredentialsOptions
×
45

×
46
        /**
×
47
         * List of read-from servers (slaves).
×
48
         */
×
49
        readonly slaves: PostgresConnectionCredentialsOptions[]
×
50

×
51
        /**
×
52
         * Default connection pool to use for SELECT queries
×
53
         * @default "slave"
×
54
         */
×
55
        readonly defaultMode?: ReplicationMode
×
56
    }
×
57

×
58
    /**
×
59
     * The milliseconds before a timeout occurs during the initial connection to the postgres
×
60
     * server. If undefined, or set to 0, there is no timeout. Defaults to undefined.
×
61
     */
×
62
    readonly connectTimeoutMS?: number
×
63

×
64
    /**
×
65
     * The Postgres extension to use to generate UUID columns. Defaults to uuid-ossp.
×
66
     * If pgcrypto is selected, TypeORM will use the gen_random_uuid() function from this extension.
×
67
     * If uuid-ossp is selected, TypeORM will use the uuid_generate_v4() function from this extension.
×
68
     */
×
69
    readonly uuidExtension?: "pgcrypto" | "uuid-ossp"
×
70

×
71
    /*
×
72
     * Function handling errors thrown by drivers pool.
×
73
     * Defaults to logging error with `warn` level.
×
74
     */
×
75
    readonly poolErrorHandler?: (err: any) => any
×
76

×
77
    /**
×
78
     * Include notification messages from Postgres server in client logs
×
79
     */
×
80
    readonly logNotifications?: boolean
×
81

×
82
    /**
×
83
     * Automatically install postgres extensions
×
84
     */
×
85
    readonly installExtensions?: boolean
×
86

×
87
    /**
×
88
     * Return 64-bit integers (int8) as JavaScript integers.
×
89
     *
×
90
     * Because JavaScript doesn't have support for 64-bit integers node-postgres cannot confidently
×
91
     * parse int8 data type results as numbers because if you have a huge number it will overflow
×
92
     * and the result you'd get back from node-postgres would not be the result in the database.
×
93
     * That would be a very bad thing so node-postgres just returns int8 results as strings and leaves the parsing up to you.
×
94
     *
×
95
     * Enabling parseInt8 will cause node-postgres to parse int8 results as numbers.
×
96
     * Note: the maximum safe integer in js is: Number.MAX_SAFE_INTEGER (`+2^53`)
×
97
     *
×
98
     * @see [JavaScript Number objects](http://ecma262-5.com/ELS5_HTML.htm#Section_8.5)
×
99
     * @see [node-postgres int8 explanation](https://github.com/brianc/node-pg-types#:~:text=on%20projects%3A%20return-,64%2Dbit%20integers,-(int8)%20as)
×
100
     * @see [node-postgres defaults.parseInt8 implementation](https://github.com/brianc/node-postgres/blob/pg%408.8.0/packages/pg/lib/defaults.js#L80)
×
101
     */
×
102
    readonly parseInt8?: boolean
×
NEW
103

×
NEW
104
    /**
×
NEW
105
     * List of additional Postgres extensions to be installed in the database.
×
NEW
106
     */
×
NEW
107
    readonly extensions?: string[]
×
UNCOV
108
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc