How to use/open psql?
25,313
You can follow this instruction
- Open the command prompt
- cd C:\postgresql-9.3.0-1-windows-x64-binaries\pgsql\bin (installed directory)
- Run: initdb -U postgres -A password -E utf8 -W -D POSTGRESQL_ROOT\data
- give super user password (Remember that)
- 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
Author by
Oto Shavadze
Updated on July 07, 2022Comments
-
Oto Shavadze almost 2 years
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...
-
a_horse_with_no_name over 10 yearsYou do know how to open a commandline (cmd.exe) window? "Start -> Run -> cmd.exe" then type
psql databasename
-
-
Viji over 10 yearsNo need to reinstall, i have updated the steps, you can follow that. psql is in Mac, for Windows its pgsql