Repository navigation
Conversation
charmander
reviewed
Nov 13, 2026
| ##### Note: | ||
|
|
||
| The Pool constructor does not support passing a Database URL as the parameter. To use pg-pool on heroku, for example, you need to parse the URL into a config object. Here is an example of how to parse a Database URL. | ||
| The Pool constructor does not support passing a Database URL as the parameter. To connect with a Database URL, for example on heroku, pass it as the `connectionString` option instead. It is passed to each client, which parses it. |
Collaborator
There was a problem hiding this comment.
Suggested change
| The Pool constructor does not support passing a Database URL as the parameter. To connect with a Database URL, for example on heroku, pass it as the `connectionString` option instead. It is passed to each client, which parses it. | |
| To connect with a [connection URI](https://node-postgres.com/features/connecting#connection-uri), pass it as the `connectionString` client option. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The pg-pool README said you have to parse a database URL into a config object yourself, and the example used the deprecated
url.parse()(prints DEP0169 on recent Node). The pool already passes its options to each client, and the client parsesconnectionString(seepg/lib/connection-parameters.jsandpg-pool/test/connection-strings.js). This replaces the manual parsing example with theconnectionStringoption.