PostgreSQL in OS X Lion
There's be mention made of the fact that OS X Lion Server ships with PostgreSQL as it's standard database rather than MySQL.
Can anyone confirm:
-
It this specific to server or does OS X Lion "client" ship with it too?
I can see indications in the file system on my Mac that it might be included but don't know whether they're the result of a previous aborted Postgres install I did on my machine pre-Lion or just some form of standardisation of directory structures that stops short of an actual install.
-
Is this intended for use as an end user database or is it just supporting functionality within the OS?
Solution 1:
On OS X Lion "client", here's what you can find:
martin$ find /usr/ -name postgre*
/usr//include/postgres_ext.h
/usr//include/postgresql
/usr//include/postgresql/internal/postgres_fe.h
/usr//include/postgresql/server/postgres.h
/usr//include/postgresql/server/postgres_ext.h
/usr//include/postgresql/server/postgres_fe.h
/usr//lib/postgresql
/usr//share/devicemgr/backend/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
/usr//share/devicemgr/backend/vendor/rails/railties/configs/databases/postgresql.yml
/usr//share/devicemgr/webserver/gems/gems/eventmachine-0.12.10/lib/em/protocols/postgres3.rb
/usr//share/man/man1/postgres.1.gz
/usr//share/postgresql
/usr//share/postgresql/postgres.bki
/usr//share/postgresql/postgres.description
/usr//share/postgresql/postgres.shdescription
/usr//share/postgresql/postgresql.conf.sample
So no binary or similar on a default install (yet there are c/c++ headers) and rails stuff. (note I have Xcode 4.1 installed, and this is where all these Header files may have come from).
2) OS X doesn't use a relational database for anything as far as I know. If it's there is to support development or, well, the service itself.
Solution 2:
They seem to have renamed the server to postgres_real
on my non-server version of Lion.
$ /usr/bin/postgres_real --version
postgres (PostgreSQL) 9.0.5
$ /usr/bin/psql --version
psql (PostgreSQL) 9.0.5
contains support for command-line editing
$
I haven't found initdb
or pg_ctl
yet so far it seems using it in practice still requires a separate userland install. I just pray that doesn't introduce conflicts and confusion between the two.