Installing postgres on Ubuntu 10.10

sudo apt-get install postgres pgadmin3

Now try to connect to postgres Applications > Programming > pgAdmin III

You will get the error below.

Postgres login error

It turns out Postgres setup is not complete yet. In MySQL you will be ready to go, root with an empty password, certainly not good for security

Switch to postgres and set the password

sipatha@lpt1:~$ sudo -u postgres psql
psql (8.4.5)
Type "help" for help.

postgres=# \password postgres
Enter new password:
Enter it again:
postgres=# \q

Now try again logging in using pgAdmin III

We good to go!