Postgresql on SUSE

From LQWiki
Jump to navigation Jump to search

Install

1. Install it:

yast -i postgresql-server

2. Start it:

/etc/init.d/postgresql start

Creating a new database

# rpm -qa --last | tac
[...]
postgresql-8.4.5-0.3.1                        Thu 30 Dec 2010 11:48:30 PM CET
postgresql-server-8.4.5-0.3.1                 Thu 30 Dec 2010 11:48:43 PM CET
# rpm -ql postgresql
[...]
/usr/bin/createdb
/usr/bin/createlang
/usr/bin/createuser
/usr/bin/dropdb
/usr/bin/droplang
/usr/bin/dropuser
/usr/bin/pg_dump
[...]
  • let's try createdb
# createdb test
  • Proof the database test exists:
# pg_dumpall | grep test
CREATE DATABASE test WITH TEMPLATE = template0 OWNER = postgres;
\connect test

See also