Issues connecting to postgresql using python on Mac
I am trying to connect to postgresql using the following code import psycopg2 hostname = 'localhost' database = 'demo' username = 'postgres' pwd = 'johndoe' port_d= 5432 conn = psycopg2.connect( host=hostname, dbname=database, user = username, password=pwd, port = port_d) conn.close()…