aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Howell2013-09-05 10:10:27 -0500
committerMax Howell2013-09-05 10:12:52 -0500
commite3ac215158ea68e5dd000d17e36efa3bb20afc74 (patch)
tree7acece5ed3c2d002a3e87f81c3c6a4783628d2d4
parentcda300bec3a0f954bcb9445e1fc17ec9a6838626 (diff)
downloadhomebrew-e3ac215158ea68e5dd000d17e36efa3bb20afc74.tar.bz2
postgres usage in caveats; Closes #21920
As a PostgreSQL n00b, this is the information I wanted. Ideally we’d set a default configuration location for postgres to look, however apparently, this is not possible. Side note: it's about time we split caveats out. One of these is advise for failed builds, and I just added usage. Usage is hardly caveats, but generally usage is cool and we should encourage it as a separate section, and encourage people to add links perhaps.
-rw-r--r--Library/Formula/postgresql.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/Library/Formula/postgresql.rb b/Library/Formula/postgresql.rb
index 7252bb26e..8cbe7a3db 100644
--- a/Library/Formula/postgresql.rb
+++ b/Library/Formula/postgresql.rb
@@ -97,13 +97,14 @@ class Postgresql < Formula
def caveats
s = <<-EOS.undent
+ initdb #{var}/postgres -E utf8 # create a database
+ postgres -D #{var}/postgres # serve that database
+ PGDATA=#{var}/postgres postgres # …alternatively
+
If builds of PostgreSQL 9 are failing and you have version 8.x installed,
you may need to remove the previous version first. See:
https://github.com/mxcl/homebrew/issues/issue/2510
- If this is your first install, create a database with:
- initdb #{var}/postgres -E utf8
-
To migrate existing data from a previous major version (pre-9.2) of PostgreSQL, see:
http://www.postgresql.org/docs/9.2/static/upgrading.html
@@ -111,7 +112,7 @@ class Postgresql < Formula
http://www.postgresql.org/docs/9.2/static/kernel-resources.html#SYSVIPC
EOS
- s << gem_caveats if MacOS.prefer_64_bit?
+ s << "\n" << gem_caveats if MacOS.prefer_64_bit?
return s
end