Skip to end of metadata
Go to start of metadata
Table of contents

Homepage:

http://www.postgresql.org/

Download:

http://www.postgresql.org/download/

File(s):

postgresql-8.4.1-1-windows.exe (39 MB)

Installation

Windows:

  • Execute the one-click installer "postgresql-8.4.1-1-windows.exe"
  • Install it to a suitable directory, e.g. "C:\Program Files\PostgreSQL\8.4"
  • Select a suitable data directory, e.g. "D:\PostgreSQL\data"
  • Enter a password for admin account "postgres"

Configuration

Per default PostgreSQL is running on port 5432.

Trusted connections for all users only from localhost

To allow trusted connections for all users only from localhost:

Windows:

File "D:PostgreSQLdatapg_hba.conf"

Restart the service ("Restart Server").

Usage

Windows:

  • You can connect to the database with the pgAdmin tool (Start - Programs - PostgreSQL 8.4 - pgAdmin III)
  • Use psql command shell.

Create a new user

Create an user with password for e.g. Liferay Portal usage:

Create new database user

Create a new database

Create e.g. database pg_liferay for Liferay Portal usage:

Create new database

Grant all permissions for a database to an user

Grant all permissions for a database to an user

Connect to a database

Connect to a database

psql usage

psql usage
  • show all databases: pg_liferay=> \l
  • change database: pg_liferay=> \connect otherdatabasename
  • show all tables of a database: pg_liferay=> \dt
  • exit: pg_liferay=> \q
  • No labels