Skip to content

Commit a953100

Browse files
author
Simone Sanfratello
committed
feature: native option
1 parent 300e15b commit a953100

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,8 @@ fastify.listen(3000, err => {
9696
As you can see there is no need to close the client, since is done internally. Promises and async await are supported as well.
9797

9898
### Native option
99-
Use native `libpq` to gain high performance; it will use [pg-native](https://github.com/brianc/node-pg-native) instead of [pg](https://github.com/brianc/node-pg).
100-
Note: it requires PostgreSQL client libraries & tools installed, see
101-
[instructions](https://github.com/brianc/node-pg-native#install).
99+
If you want to gain the maximum performances you can install [pg-native](https://github.com/brianc/node-pg-native), and pass `native: true` to the plugin options.
100+
*Note: it requires PostgreSQL client libraries & tools installed, see [instructions](https://github.com/brianc/node-pg-native#install).*
102101
Note: trying to use native options without successfully installation of `pg-native` will get a warning and fallback to regular `pg` module.
103102

104103
```js

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,10 @@
2727
"homepage": "https://github.com/fastify/fastify-postgres#readme",
2828
"dependencies": {
2929
"fastify-plugin": "^0.1.1",
30-
"pg": "^7.3.0",
31-
"pg-native": "^2.2.0"
30+
"pg": "^7.3.0"
3231
},
33-
"optionalDependencies": {},
3432
"devDependencies": {
33+
"pg-native": "^2.2.0",
3534
"fastify": "^0.29.2",
3635
"standard": "^10.0.3",
3736
"tap": "^10.7.2"

0 commit comments

Comments
 (0)