Thinkful-Ed / node-sql-sequelize-lessons

Extension work on SQL and Sequelize for Thinkful's Node course
https://courses.thinkful.com/node-sql-001v1/unit/1
1 stars 4 forks source link

BASH commands vs SQL equivalents #7

Open cklanac opened 7 years ago

cklanac commented 7 years ago

We've experienced several issues with postgres commands on Windows in Git Bash. For example:

$ psql dev -U dev
psql: warning: extra command-line argument "dev" ignored
Password for user -U:

That should say Password for user dev:

Other errors are "too many arguments", "warning: extra command-line argument "postgres" ignored" and sometimes just ignored without error or warning.

Possible Solutions:

1) One solution is to be sure that all switch arguments go before non-switched arguments

2) Use built-in command prompt

Also like to investigate used SQL equivalents to BASH commands.

So compare Bash Commands like $ createdb -U dev dev-restaurants-app versus. => CREATE DATABASE dev-restaurants-app OWNER dev

Note from Postgres Documentation: "createdb is a wrapper around the SQL command CREATE DATABASE. There is no effective difference between creating databases via this utility and via other methods for accessing the server."