postgrator-cli icon indicating copy to clipboard operation
postgrator-cli copied to clipboard

Provide connectionstring/dsn

Open rhys-vdw opened this issue 6 years ago • 3 comments

Would be it be possible to support a single DSN argument rather than the host/db/username/pass vars?

(Might be more appropriate to open this issue at postgrator itself)

rhys-vdw avatar Jan 11 '19 04:01 rhys-vdw

This would be a nice addition. Open to PRs?

bcomnes avatar Mar 31 '22 16:03 bcomnes

Apparently all ENV vars that https://node-postgres.com/features/connecting#environment-variables supports also works with this cli. Do you see DSN env var listed here?

https://www.postgresql.org/docs/9.1/libpq-envars.html

bcomnes avatar Mar 31 '22 17:03 bcomnes

I'm not sure about the usefulness of this feature and it doesn't seem to be able to be elegantly implemented... The underlying clients seem to not really work with connection strings. I'd look over a PR implementing this though if you think this would be useful

perrin4869 avatar Mar 31 '22 17:03 perrin4869