Oto Shavadze
Oto Shavadze

Reputation: 42753

How to use/open psql?

I have installed On windows 7 postgreSQL 9.2 version.

Now, I need use psql, so where is this terminal?

Can you tell me please how to use for example this comand: psql databasename ?

Where must be type this?

Yes, may be this is dumb question, but...

Upvotes: 0

Views: 30926

Answers (2)

AlixaProDev
AlixaProDev

Reputation: 560

The easy way to start is

  1. Open Run Window by Winkey + R
  2. Type services.msc
  3. Search Postgres service based on version installed.
  4. Click stop, start or restart the service option.

Upvotes: 0

Viji
Viji

Reputation: 2629

You can follow this instruction

  1. Open the command prompt
  2. cd C:\postgresql-9.3.0-1-windows-x64-binaries\pgsql\bin (installed directory)
  3. Run: initdb -U postgres -A password -E utf8 -W -D POSTGRESQL_ROOT\data
  4. give super user password (Remember that)
  5. you wiil get the success message

Success. You can now start the database server using:

"postgres" -D "POSTGRESQL_ROOT\data"

or "pg_ctl" -D "POSTGRESQL_ROOT\data" -l logfile start

then, you are good to start the server

To stop the server : simply ctrl + c

You can use pgAdmin tool(http://www.postgresql.org/ftp/pgadmin3/release/v1.8.4/win32/) somewhat similar like SQL Mgt Studio

Reference : http://www.petrikainulainen.net/programming/tips-and-tricks/installing-postgresql-9-1-to-windows-7-from-the-binary-zip-distribution/

Upvotes: 6

Related Questions