Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@
[Node-postgres](https://node-postgres.com/) (`pg`) is the recommended driver for connecting to your Postgres database from JavaScript or TypeScript Workers. It has the best compatibility with Hyperdrive's caching and is commonly available with popular ORM libraries. [Postgres.js](https://github.com/porsager/postgres) is also supported.

:::

:::caution[Do not use `prepare: false` with Postgres.js]

[`prepare: false`](https://github.com/porsager/postgres?tab=readme-ov-file#prepared-statements) disables prepared statements. Postgres.js then sends additional protocol messages to discover parameter types before each query. Hyperdrive's [transaction pooling mode](/hyperdrive/concepts/how-hyperdrive-works/#pooling-mode) does not reliably support this behavior. This can cause queries to hang or fail intermittently.

:::
Loading