Difference between revisions of "Brew install postgresql@15"

From wikieduonline
Jump to navigation Jump to search
 
(7 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
{{lc}}
 
{{lc}}
  
  [[brew install]] postgresql@15
+
  [[brew install postgresql]]@15
  
 +
==> Caveats
 +
==> postgresql@15
 +
This formula has created a default database cluster with:
 +
  [[initdb]] [[--locale]]=C [[-E]] [[UTF-8]] /Users/user/brew/var/postgresql@15
 +
For more details, read:
 +
  https://www.postgresql.org/docs/15/app-initdb.html
 +
<pre>
 +
postgresql@15 is keg-only, which means it was not symlinked into /Users/user/brew,
 +
because this is an alternate version of another formula.
  
[[psql postgres]]
+
If you need to have postgresql@15 first in your PATH, run:
 +
  echo 'export PATH="/Users/user/brew/opt/postgresql@15/bin:$PATH"' >> ~/.zshrc
  
 +
For compilers to find postgresql@15 you may need to set:
 +
  export LDFLAGS="-L/Users/user/brew/opt/postgresql@15/lib"
 +
  export CPPFLAGS="-I/Users/user/brew/opt/postgresql@15/include"
  
 +
For pkg-config to find postgresql@15 you may need to set:
 +
  export PKG_CONFIG_PATH="/Users/user/brew/opt/postgresql@15/lib/pkgconfig"
 +
 +
 +
To restart postgresql@15 after an upgrade:
 +
  brew services restart postgresql@15
 +
Or, if you don't want/need a background service you can just run:
 +
  /Users/user/brew/opt/postgresql@15/bin/postgres -D /Users/user/brew/var/postgresql@15
 +
</pre>
 +
 +
 +
To connect:
 +
* <code>[[psql postgres]]</code>
 +
 +
 +
== Errors ==
 
  psql
 
  psql
  [[psql: error: connection to server on socket]] "/tmp/.s.PGSQL.5432" failed: FATAL:  database "xxxx" does not exist
+
  [[psql: error: connection to server on socket]] "[[/tmp/.s.PGSQL.5432]]" failed: FATAL:  database "xxxx" does not exist
  
 
== Related ==
 
== Related ==
Line 15: Line 44:
  
 
== See also ==
 
== See also ==
* {{PostgreSQL}}
+
* {{psql}}
 +
* {{brew install postgres}}
  
[[Category:SQL]]
+
[[Category:PostgreSQL]]

Latest revision as of 10:17, 23 September 2024

brew install postgresql@15
==> Caveats
==> postgresql@15
This formula has created a default database cluster with:
  initdb --locale=C -E UTF-8 /Users/user/brew/var/postgresql@15
For more details, read:
  https://www.postgresql.org/docs/15/app-initdb.html
postgresql@15 is keg-only, which means it was not symlinked into /Users/user/brew,
because this is an alternate version of another formula.

If you need to have postgresql@15 first in your PATH, run:
  echo 'export PATH="/Users/user/brew/opt/postgresql@15/bin:$PATH"' >> ~/.zshrc

For compilers to find postgresql@15 you may need to set:
  export LDFLAGS="-L/Users/user/brew/opt/postgresql@15/lib"
  export CPPFLAGS="-I/Users/user/brew/opt/postgresql@15/include"

For pkg-config to find postgresql@15 you may need to set:
  export PKG_CONFIG_PATH="/Users/user/brew/opt/postgresql@15/lib/pkgconfig"


To restart postgresql@15 after an upgrade:
  brew services restart postgresql@15
Or, if you don't want/need a background service you can just run:
  /Users/user/brew/opt/postgresql@15/bin/postgres -D /Users/user/brew/var/postgresql@15


To connect:


Errors[edit]

psql
psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL:  database "xxxx" does not exist

Related[edit]


See also[edit]

Advertising: