I tried connecting my Postgres database Employees
to a SQL Server, however, whenever I try, I get an error saying the request was ignored.
Trying to create database on sql server
I tried to create a new database called employees with template0 on SQL Server from postgres after initializing the postgres on SQL Server by typing in
~psql -U postgres
and I get an error :
2
Answers
In the screenshot you provided you are writing queries in the fields of host, post and username that’s why you get an error because you are writing queries before even connecting to the database.
You should follow the prompts and enter the required information like hostname, port and username If you want to use the default values (which is between brackets) hit enter.
After connecting to the database you can now write your queries.
You can ignore all the warnings, the important part is that it cannot find the host from Your shell, check the command syntax.
https://hasura.io/blog/top-psql-commands-and-flags-you-need-to-know-postgresql/
So this command you display is only part of what you need
apparently the default will be this implementation if you do not specify anyting, like in your case:
so then it interprets your "-U" as the host which cannot be found,
so try using explicit arguments and if your database is on your local host, you can ignore the host argument