Database Reference
In-Depth Information
The pg:psql command
The psql is the PostgreSQL interactive terminal that allows you to type queries interact-
ively as well as see the results. You can also send files to be processed, and provide a num-
ber of meta-commands and shell-like features to facilitate script writing and automating
tasks.
Tip
You must have PostgreSQL installed on your computer to be able to use this command.
The following command uses the pg:psql command:
$ heroku pg:psql --app your-app-name
---> Connecting to HEROKU_POSTGRESQL_GOLD_URL (DATABASE_URL)
psql (9.3.4, server 9.3.3)
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.
your-app-name::GOLD=>
Note
For Windows users, psql was built to be a console application and by default the Win-
dows Command Prompt uses a different encoding for the rest of the system. When psql
detects a code page that returns an error, it generates a warning at startup.
To set the correct console code page, two actions are necessary:
First, set the appropriate code page through the command cmd.exe /c chcp 1252 .
After that, apply the font Lucida Console to the Command Prompt. Right-click on the title
bar and select Properties , then click on the Font tab, and finally select the Lucida Console
font.
Search WWH ::




Custom Search