https://github.com/notryanb/psql_connect
Easily log into psql from connection strings in .pgpass file
https://github.com/notryanb/psql_connect
Last synced: 4 months ago
JSON representation
Easily log into psql from connection strings in .pgpass file
- Host: GitHub
- URL: https://github.com/notryanb/psql_connect
- Owner: notryanb
- Created: 2018-05-25T14:02:22.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-14T20:02:11.000Z (almost 8 years ago)
- Last Synced: 2025-02-10T05:46:11.589Z (over 1 year ago)
- Language: Rust
- Size: 22.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
psql_connect
---
Using `psql` to log into remote Postgres databases is tedious and I don't like typing out the shell command.
Users can set up `.pgpass' file as suggested in the [Postgres docs],
however the connection strings can be very long and hard to enter.
This tool will list every connection string a user has configured in the `.pgpass` file
and let you select which instance to connect to.
`psql_connect` currently relies on adding an alias to the `.pgpass` format.
> hostname:port:database:username:password:alias
If no alias is present for the connection, `psql_connect` will display the hostname of that database.
There is presently no way to connect to databases that don't have an alias.
The roadmap includes adding in features to connect by number (as output by `psqlconnect --list`)
and creating aliases via the cli tool.
[Postgres docs]: https://www.postgresql.org/docs/9.6/static/libpq-pgpass.html