What Is Psql Shell

psql is a terminal-based front-end to PostgreSQL. It enables you to type in queries interactively, issue them to PostgreSQL, and see the query results. Alternatively, input can be from a file or from command line arguments.

How do I open PostgreSQL?

  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.

How do I set up PostgreSQL?

  1. Download and install a PostgreSQL server. …
  2. Add the PostgreSQL bin directory path to the PATH environmental variable. …
  3. Open the psql command-line tool: …
  4. Run a CREATE DATABASE command to create a new database. …
  5. Connect to the new database using the command: \c databaseName.
Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest