Just started using postgreSQL today alongside Python. I am trying to execute a query using the 'psycopg2' library but I am getting the following error: 'ProgrammingError: relation "users" does not exist'
In my pSQL cmd line I have can see my 'users' table all lowercase no capitalisation going on so not sure what's going on.. I will paste my query below. Thank you in advance for any help guys!
conn = psycopg2.connect(host="127.0.0.1", database="test", user="postgres", password="password")
cur = conn.cursor()
cur.execute('SELECT * FROM users WHERE username = %s AND password = %s', (username, password))
Note When I run \dt I get the following
List of relations
Schema | Name | Type | Owner
--------+-------+-------+----------
public | users | table | postgres
psql -h 127.0.0.1 test -U postgres -c "SELECT * FROM users limit 1"- Vao Tsun