Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • Database creation using PostgreSQL

    • 0
    • 1
    • 1
    • 1
    • 0
    • 0
    • 0
    • 0
    • 505
    Comment on it

    Database creation using PostgreSQL

    To start work with postgres, you need to install Postgres. To download PostgreSQL 9.1, go through below link:


    To check that you are able to access psql, open cmd and fire command psql. If you are getting error like 'psql' not recognized then add Postgres BIN location into environment path variable ..Program Files\PostgreSQL\9.1\bin

    Some time you need to change Method type in "C:\Program Files\PostgreSQL\9.1\data\pg_hba.conf" file. Change MD5 to trust between line number 76 to 86.

    1. Before creating database in postgres, you need to create a user/role to access DB. So there some steps to do it.

    a. Goto POSTGRES 'bin' directory in CMD

    b. Fire this command >> psql -U postgres

    c. You see this type "postgres=#"

    d. Fire this command >> CREATE USER user_name WITH PASSWORD 'password';

    2. Now role/user with name has been created. Open pgAdmin3 tool connect PostgreSQL9.1 (right-click and select Connect option).

    3. Right click on Database and select create Database option. Write any name and select Owner for it. The user which you created in step 4, same name will be appered into dropdown.

    4. Now go to that path location where your DB dump file is located. (E:\dbDump)

    5. In command promt, goto dump file location and fire following command "psql -U postgres DATABASE_NAME < DUMP_NAME_WITH_EXTENSION"

 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: