Trying to execute SQL script in Pycharm using button "Execute SQL script" and get:
Error executing SQL script "/home/mike/PycharmProjects/db_pjct/DB/f_companies.sql". Details: Cannot run program "psql ": error=2, No such file or directory
DB Execution console:
Jan 14, 2017 3:47:11 PM: shedule_db / f_companies.sql - Executing command: psql --echo-all --host=localhost --port=5432 --dbname=shedulator --username=postgres -f "/tmp/DBN763311781346405195.sql"
Database runs on localhost. Statement execution in PyCahrm works well, no problem. Execution script from console also works well:
psql -h localhost -U postgres -d db_pjct -f /home/mike/PycharmProjects/db_pjct/DB/f_companies.sql
Where is my mistake?
Found the answer
right click on selected text and right click "execute SQL Script"
A DB Navigator - Execute SQL script window opens up open the drop down in the [Cmd-Line interface] field and select "+"
2.1 -navigate to the psql folder (open a new terminal type in "which psql" to find your installation dir"; mine is at '/usr/bin/psql' )
execute selected text to your hearts content :)
p.s. don't forget to press the commit button because everything you do is run in a transaction space, and you need to click on commit to see changes in the db,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With