1

I've previously been using PostgreSQL in Ubuntu using:

$sudo -i -u postgres

to access postgres through the terminal to create a role and database. And then able to log in and make changes using:

$sudo -u [dbname] psql

However now I need to use PostgreSQL with LabVIEW so I've had to download PostgreSQL on a Windows PC. I can access the database through Pgadmin and have created a database but when I go into SQL shell it comes up with:

Server [localhost]:
Database [postgres]:
Port [5432]:
Username [postgres]:

I'm not sure if this has anything to do with roles, as I haven't created one for the windows database. But I can't even get past the above to create a role or make any changes in the command prompt.

When I type my computer host name, it says

    psql: could not translate host name "Lisa" to address: Unknown host

It says I am connected on PgAdmin and I am able to create databases and tables through the interface, but I can't figure out how to access it in the SQL Shell (psql).

2
  • 1
    Don't put "solved" into the title of the question. Accept the answer - that will mark this question as solved. Commented Oct 13, 2016 at 11:27
  • @a_horse_with_no_name thanks for your feedback Commented Oct 13, 2016 at 12:23

1 Answer 1

1

Entered server as localhost IP.

    Server [localhost]: 127.0.0.1 
    Database [localhost]: [dbname]
    Port [5432]: 5432
    Username [postgres]: [username]
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.