How do I access the PostgreSQL consoles?

1

I recently purchased this book and I have followed the guidelines on how to install PostgreSQL for the Windows operating system:

Icanmakeallthechangespossibleintheinteractiveenvironment,butIwanttohaveaccesstotheconsolemoduleasIamaccustomedto.

I need guidance on this.

When I clicked on the executable it gave this error

    
asked by anonymous 07.04.2015 / 11:37

1 answer

1

You need to call psql at the prompt otherwise a black screen will pop up and disappear.

In order not to enter this long path, create an environment variable in windows and add the executable path so psql will be available at the prompt without needing to be in the postgres folder.

1 - Right click on (my) computer > properties > advanced settings

2 - In the advanced tab click environment variables, in the variáveis do sistema click new tab.

3-clickonnovoofthenameofpg_homeandpassthepathofthebinfolderofpostgres.

4-Stillonthevariáveisdosistematab,searchforpathclickoneditplacethecursorattheendandtype:;%pg_home%.Thepointandvirgularisthepathseparatorinwindows.5-Openanewpromptandtypepsqlshouldwork.

At the prompt type:

psql -U usuario -d database

Then enter the user's password and enter the queries you need.

Documentation with psql parameters

    
07.04.2015 / 14:10