Open banool opened 3 weeks ago
You can use something like https://www.npmjs.com/package/pg-connection-string to parse the string into a config, which can then be used to connect.
Note that the parsed config object is not 1:1 compatible with https://malthe.github.io/ts-postgres/interfaces/Configuration.html – there are some differences which could be relevant, depending on the configuration.
Is there a way to connect just using a postgres connection string, e.g. like this: https://stackoverflow.com/a/20722229/3846032.
I checked the code and couldn't see anything but perhaps I'm missing it.