PostgreSQL
Connect
Section titled “Connect”usql pg://user:pass@host/dbnameWithout a host, usql connects as the local user, through the Unix domain socket of the local server:
usql pg://To connect without TLS, add sslmode=disable:
usql "pg://user:pass@host/dbname?sslmode=disable"The driver also reads the password from the PGPASSWORD environment variable, and from the ~/.pgpass file or the file that PGPASSFILE names, as psql does. Passwords shows the ways that usql itself takes a password.
Schemes and aliases
Section titled “Schemes and aliases”| Scheme | Aliases | Go driver | Notes |
|---|---|---|---|
postgres | pg, pgsql, postgresql | github.com/jackc/pgx/v5/stdlib | Transports: +unix. |
pgx | px | github.com/jackc/pgx/v5/stdlib | Transports: +unix. |
pq | libpq | github.com/lib/pq | Transports: +unix. |