The lastest version of Postgres is 9.2.  This object-relational database manamgement system is available in Linux, Windows, MAC OS, FreeBSD and Solaris. Here are few simple steps to kick start with postgres Database System.

To connect to the postgres database server with default user postgres
#psql -d template1 -U postgres

To create a user with desired password
#CREATE USER UserName WITH PASSWORD ‘DbPassword’;

To create database
#CREATE DATABASE DatabaseName;

To grant privileges (all) to specific database
#GRANT ALL PRIVILEGES ON DATABASE DatabaseName to Username;

To show all databases;
#\l

To delete a database;
#DROP DATABASE DatabaseName;

To list users
#\du

To disconnect from the postgres database server
#\q

 

Alternatively we could manage pgadmin to administer and develop postgres.

You could download this tools form the below official website of pgadmin

http://www.pgadmin.org/download/

 

Advertisements