Difference between revisions of "$HOME/.pg service.conf"
Jump to navigation
Jump to search
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | * Configuration: <code>[[$HOME]]/.pg_service.conf</code> | |
+ | * Connection: <code>psql service=YourDBpage</code> | ||
* https://www.postgresql.org/docs/13/libpq-pgservice.html | * https://www.postgresql.org/docs/13/libpq-pgservice.html | ||
Line 8: | Line 9: | ||
host=somehost | host=somehost | ||
port=5432 | port=5432 | ||
− | dbname=test | + | [[dbname]]=test |
user=admin | user=admin | ||
Line 25: | Line 26: | ||
* [[Show tables]], [[List users]] | * [[Show tables]], [[List users]] | ||
* <code>[[aws rds describe-db-instances]] | grep -w [[DBInstanceIdentifier]]</code> | * <code>[[aws rds describe-db-instances]] | grep -w [[DBInstanceIdentifier]]</code> | ||
− | * [[$HOME/.psqlrc]] | + | * <code>[[$HOME/.psqlrc]]</code> |
== See also == | == See also == |
Latest revision as of 09:04, 16 August 2022
- Configuration:
$HOME/.pg_service.conf
- Connection:
psql service=YourDBpage
touch $HOME/.pg_service.conf # My comment for mydb [MyDB] host=somehost port=5432 dbname=test user=admin
psql service=MyDB https://stackoverflow.com/a/39097994
[MySecondDB] host=localhost port=5432 dbname=test user=admin password=your_password
Related terms[edit]
su - postgres
- Show tables, List users
aws rds describe-db-instances | grep -w DBInstanceIdentifier
$HOME/.psqlrc
See also[edit]
- SQL, NewSQL, RDMS: GraphQL (2015), SQLite,
select, insert
,select count
, Distributed SQL, TablePlus, Cache hit ratio,pg_stat_user_tables
,EXPLAIN
, Index (PostgreSQL), DDL, SQL/MED, Group by, List users, SQL Injection, SQLAlchemy,CREATE USER, CREATE ROLE, EXPLAIN, ALTER DATABASE, REVOKE, NOLOCK, NOWAIT, EXISTS
, Unique constraint,.sql
- PostgreSQL:
psql
,.psqlrc, .pgpass
,$HOME/.pg service.conf
,-U, -W, -d
, meta-commands:\du, \dg, \ddp, \dp, \list, \dn, \dt, \c, \l, \di, \q
,show users
,show
,su - postgres
,psql -c, \?, \connect, \conninfo
,--version, --help
, PL/pgSQL
Advertising: