Difference between revisions of "$HOME/.pg service.conf"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
 
(19 intermediate revisions by 3 users 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
  
  [[touch]] .pg_service.conf
+
  [[touch]] $HOME/.pg_service.conf
 
  # My comment for mydb
 
  # My comment for mydb
 
  [MyDB]  
 
  [MyDB]  
 
  host=somehost  
 
  host=somehost  
  port=5433
+
  port=5432
 +
[[dbname]]=test
 
  user=admin
 
  user=admin
 
  
 
  [[psql]] service=MyDB
 
  [[psql]] service=MyDB
 
  https://stackoverflow.com/a/39097994
 
  https://stackoverflow.com/a/39097994
  
 +
[MySecondDB]
 +
host=localhost
 +
port=[[5432]]
 +
dbname=test
 +
user=admin
 +
password=your_password
  
 
== Related terms ==
 
== Related terms ==
* <code>[[.ssh/config]]</code>
 
 
* <code>[[su - postgres]]</code>
 
* <code>[[su - postgres]]</code>
 +
* [[Show tables]], [[List users]]
 +
* <code>[[aws rds describe-db-instances]] | grep -w [[DBInstanceIdentifier]]</code>
 +
* <code>[[$HOME/.psqlrc]]</code>
  
 
== See also ==
 
== See also ==
 +
* {{SQL}}
 
* {{psql}}
 
* {{psql}}
  
  
 
[[Category:PostgreSQL]]
 
[[Category:PostgreSQL]]

Latest revision as of 09:04, 16 August 2022

Advertising: